Skip to content

Commit

Permalink
Merge pull request #694 from ushahidi/limit-editing-own-posts-1826
Browse files Browse the repository at this point in the history
Disable permission checkboxes when editing admin role
  • Loading branch information
rjmackay authored Jul 27, 2017
2 parents 75413c3 + 83199c5 commit d3221c1
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion app/settings/roles/roles-edit.html
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,14 @@ <h1 class="mode-context-title" ng-show="!role.id" translate>app.add_role</h1>
<p ng-hide="permissions.length"><em translate>empty.permission</em></p>
</div>

<div class="form-field checkbox" ng-repeat="permission in permissions">
<div class="form-field checkbox" ng-repeat="permission in permissions" ng-if="role.name == 'admin'">
<label for="{{permission.id}}">
<input id="{{permission.id}}" type="checkbox" disabled checked="checked">
{{permission.name}}
</label>
</div>

<div class="form-field checkbox" ng-repeat="permission in permissions" ng-if="role.name != 'admin'">
<label for="{{permission.id}}">
<input id="{{permission.id}}" type="checkbox" value="permission.name" checklist-model="role.permissions" checklist-value="permission.name">
{{permission.name}}
Expand Down

0 comments on commit d3221c1

Please sign in to comment.