Skip to content

Commit

Permalink
add permission for Fra Kåre Dashboard
Browse files Browse the repository at this point in the history
  • Loading branch information
kkuepper committed Oct 23, 2024
1 parent c0b2aa0 commit 967d3b1
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 16 deletions.
21 changes: 5 additions & 16 deletions admin/app/scripts/controllers/users.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ angular.module('bmmApp')
ROLE_NOTIFICATION_MANAGER: false,
ROLE_CONTRIBUTOR_MANAGER: false,
ROLE_FEATURE_PREVIEW: false,
ROLE_LIVE_MANAGER: false
ROLE_LIVE_MANAGER: false,
ROLE_FRAKAARE_DASHBOARD: false
};

$.each(this.roles, function() {
Expand Down Expand Up @@ -75,20 +76,7 @@ angular.module('bmmApp')
$scope.fetchUsers = function() {

_api.userGet({
size: 500,
roles: [
'ROLE_ADMINISTRATOR',
'ROLE_ALBUM_MANAGER',
'ROLE_TRACK_MANAGER',
'ROLE_PODCAST_MANAGER',
'ROLE_PLAYLIST_MANAGER',
'ROLE_DOWNLOADER',
'ROLE_TRANSCRIPTION_MANAGER',
'ROLE_NOTIFICATION_MANAGER',
'ROLE_CONTRIBUTOR_MANAGER',
'ROLE_FEATURE_PREVIEW',
'ROLE_LIVE_MANAGER'
]
size: 500
}).done(function(users) {
$scope.$apply(function() {

Expand All @@ -100,7 +88,8 @@ angular.module('bmmApp')
ROLE_TRACK_MANAGER: false,
ROLE_CONTRIBUTOR_MANAGER: false,
ROLE_FEATURE_PREVIEW: false,
ROLE_LIVE_MANAGER: false
ROLE_LIVE_MANAGER: false,
ROLE_FRAKAARE_DASHBOARD: false
};

$.each(this.roles, function() {
Expand Down
8 changes: 8 additions & 0 deletions admin/app/views/pages/users.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ <h4>{{init.translation.page.contributors.search}}</h4>
<th>Transcriptions</th>
<th>{{init.translation.page.users.notificationManager}}</th>
<th>{{init.translation.page.users.featurePreview}}</th>
<th>Fra Kåre Dashboard</th>
<th>{{init.translation.page.users.liveManager}}</th>
<th>{{init.translation.page.users.allRights}}</th>
</tr>
Expand Down Expand Up @@ -56,6 +57,9 @@ <h4>{{init.translation.page.contributors.search}}</h4>
<td>
<input type="checkbox" ng-model="user.perm.ROLE_FEATURE_PREVIEW" ng-change="updateUser(user, true)">
</td>
<td>
<input type="checkbox" ng-model="user.perm.ROLE_FRAKAARE_DASHBOARD" ng-change="updateUser(user, true)">
</td>
<td>
<input type="checkbox" ng-model="user.perm.ROLE_LIVE_MANAGER" ng-change="updateUser(user, true)">
</td>
Expand Down Expand Up @@ -97,6 +101,7 @@ <h3>{{init.translation.page.users.adminUsers}}</h3>
<th>Transcriptions</th>
<th>{{init.translation.page.users.notificationManager}}</th>
<th>{{init.translation.page.users.featurePreview}}</th>
<th>Fra Kåre Dashboard</th>
<th>{{init.translation.page.users.liveManager}}</th>
<th>{{init.translation.page.users.allRights}}</th>
</tr>
Expand Down Expand Up @@ -134,6 +139,9 @@ <h3>{{init.translation.page.users.adminUsers}}</h3>
<td>
<input type="checkbox" ng-model="user.perm.ROLE_FEATURE_PREVIEW" ng-change="updateUser(user)">
</td>
<td>
<input type="checkbox" ng-model="user.perm.ROLE_FRAKAARE_DASHBOARD" ng-change="updateUser(user)">
</td>
<td>
<input type="checkbox" ng-model="user.perm.ROLE_LIVE_MANAGER" ng-change="updateUser(user)">
</td>
Expand Down

0 comments on commit 967d3b1

Please sign in to comment.