Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improved: permission management in case of adding and updating permission association with group. (#227) #230

Merged
merged 2 commits into from
Apr 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/authorization/Actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ export default {
'APP_UPDT_PRODUCT_STORE_CONFG': 'APP_UPDT_PRODUCT_STORE_CONFG',
'APP_SUPER_USER': 'APP_SUPER_USER',
'APP_SECURITY_GROUP_CREATE': 'APP_SECURITY_GROUP_CREATE',
'APP_PERMISSION_CREATE': 'APP_PERMISSION_CREATE',
'APP_PERMISSION_UPDATE': 'APP_PERMISSION_UPDATE',
'APP_PERMISSION_VIEW': 'APP_PERMISSION_VIEW',
'APP_USER_CREATE': 'APP_USER_CREATE'
Expand Down
3 changes: 2 additions & 1 deletion src/authorization/Rules.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ export default {
'APP_UPDT_PASSWORD': 'SECURITY_CREATE OR SECURITY_ADMIN',
'APP_UPDT_PRODUCT_STORE_CONFG': 'SECURITY_CREATE OR SECURITY_ADMIN',
'APP_SECURITY_GROUP_CREATE': 'SECURITY_CREATE OR SECURITY_ADMIN',
'APP_PERMISSION_UPDATE': 'SECURITY_CREATE OR SECURITY_ADMIN',
'APP_PERMISSION_CREATE': 'SECURITY_CREATE OR SECURITY_ADMIN',
'APP_PERMISSION_UPDATE': 'SECURITY_UPDATE OR SECURITY_ADMIN',
'APP_PERMISSION_VIEW': 'SECURITY_VIEW OR SECURITY_ADMIN',
'APP_SUPER_USER': 'WEBTOOLS_VIEW',
'USERS_APP_VIEW': 'USERS_APP_VIEW'
Expand Down
2 changes: 1 addition & 1 deletion src/components/PermissionItems.vue
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
<ion-card-title>{{ permission.permissionId }}</ion-card-title>
<ion-card-subtitle>{{ permission.description }}</ion-card-subtitle>
</div>
<ion-checkbox :disabled="!hasPermission(Actions.APP_PERMISSION_UPDATE)" :checked="permission.isChecked" @click="updatePermissionAssociation($event, permission)" />
<ion-checkbox :disabled="permission.isChecked ? !hasPermission(Actions.APP_PERMISSION_UPDATE) : !hasPermission(Actions.APP_PERMISSION_CREATE)" :checked="permission.isChecked" @click="updatePermissionAssociation($event, permission)" />
</ion-card-header>
</ion-card>
</section>
Expand Down
Loading