Skip to content

Commit

Permalink
Removed isAdmin check in user list
Browse files Browse the repository at this point in the history
  • Loading branch information
alirizaadiyahsi committed Nov 30, 2018
1 parent a2d0ead commit ae49d17
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
5 changes: 0 additions & 5 deletions src/Nucleus.Web.Vue/src/admin/views/users/user-list.ts
Original file line number Diff line number Diff line change
Expand Up @@ -118,11 +118,6 @@ export default class UserListComponent extends NucleusComponentBase {
});
}

public isAdminUser(userName: string) {
// todo: this is a temp solution, should check if user is in admin role
return userName.includes('admin');
}

public selectAllRoles() {
this.createOrUpdateUserInput.grantedRoleIds = [];
if (this.selectAll) {
Expand Down
4 changes: 2 additions & 2 deletions src/Nucleus.Web.Vue/src/admin/views/users/user-list.vue
Original file line number Diff line number Diff line change
Expand Up @@ -76,12 +76,12 @@
<td>{{ props.item.userName }}</td>
<td>{{ props.item.email }}</td>
<td class="justify-center layout px-0">
<v-icon v-if="!isAdminUser(props.item.userName) && nucleus.auth.isGranted('Permissions_User_Update')" small
<v-icon v-if="nucleus.auth.isGranted('Permissions_User_Update')" small
class="mr-2"
@click="editUser(props.item.id)">
edit
</v-icon>
<v-icon v-if="!isAdminUser(props.item.userName) && nucleus.auth.isGranted('Permissions_User_Delete')" small
<v-icon v-if="nucleus.auth.isGranted('Permissions_User_Delete')" small
@click="deleteUser(props.item.id)">
delete
</v-icon>
Expand Down

0 comments on commit ae49d17

Please sign in to comment.