Merge remote-tracking branch 'origin/master'
This commit is contained in:
@@ -191,7 +191,8 @@ import api from 'src/services/api'
|
||||
import { usePermission } from 'src/composables/usePermission'
|
||||
|
||||
const { canUpdate } = usePermission()
|
||||
const canUpdateUser = canUpdate('user')
|
||||
// This screen manages system-wide permission sets; gate by system:update.
|
||||
const canUpdateUser = canUpdate('system')
|
||||
const route = useRoute()
|
||||
const router = useRouter()
|
||||
|
||||
@@ -394,13 +395,22 @@ async function save () {
|
||||
|
||||
const payload = []
|
||||
|
||||
// UI action keys -> backend action codes
|
||||
const toBackendAction = {
|
||||
write: 'insert',
|
||||
read: 'view',
|
||||
delete: 'delete',
|
||||
update: 'update',
|
||||
export: 'export'
|
||||
}
|
||||
|
||||
rows.value.forEach(r => {
|
||||
|
||||
actions.forEach(a => {
|
||||
|
||||
payload.push({
|
||||
module: r.module,
|
||||
action: a.key,
|
||||
action: toBackendAction[a.key] || a.key,
|
||||
allowed: r[a.key]
|
||||
})
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user