Skip to content

Commit

Permalink
Fix permissions in some new actions and also in send-auth button (#399)
Browse files Browse the repository at this point in the history
Parent issue: sequentech/meta#127
  • Loading branch information
edulix committed Sep 21, 2023
1 parent 6dcd8d2 commit b0a6b00
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion avAdmin/admin-directives/dashboard/dashboard.html
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ <h2>
<strong>{{ election.auth.census|number }}</strong><br/>
<button
ng-click="sendAuthCodes()"
ng-if="scope.hasPerms(['send-auth-all', 'edit'])"
ng-if="hasPerms(['send-auth-all', 'edit'])"
class="btn btn-success send-auth pull-left">
<i class="fa fa-sw fa-send"></i>
<span ng-i18next>
Expand Down
3 changes: 3 additions & 0 deletions avAdmin/admin-directives/dashboard/dashboard.js
Original file line number Diff line number Diff line change
Expand Up @@ -1378,6 +1378,9 @@ angular.module('avAdmin')
scope.perms.val.indexOf("schedule-events") !== -1 ||
scope.perms.val.indexOf("edit") !== -1
);
},
permsFunc: function() {
return scope.hasPerms(["schedule-events", "edit"]);
}
},
];
Expand Down

0 comments on commit b0a6b00

Please sign in to comment.