Replies: 3 comments 1 reply
-
To disable the drop-down selection boxes for users with editor permissions, you can use the "UI Access Control" (UI ACL) feature in NocoDB. This feature allows you to enable or disable access to specific tables for different roles, which can indirectly control the visibility and accessibility of UI components like drop-down selection boxes. Here are the steps to configure UI ACL:
This will allow you to control the access to drop-down selection boxes based on user roles, including disabling them for editors. For more detailed customization, you might need to modify the code in the const roles = ref<string[]>(['editor', 'commenter', 'viewer'])
const allSelected = computed(() => {
return roles.value.reduce((acc, role) => {
return {
...acc,
[role]: tables.value.filter((t) => t.disabled[role]).length === 0,
}
}, {} as Record<Role, boolean>)
})
const toggleSelectAll = (role: Role) => {
const newValue = !allSelected.value[role]
tables.value.forEach((t) => {
t.disabled[role] = newValue
t.edited = true
})
}
const onRoleCheck = (record: any, role: Role) => {
record.disabled[role] = !record.disabled[role]
record.edited = true
} This code snippet shows how to manage the visibility of tables based on user roles, which can be adapted to disable drop-down selection boxes for editors [1][2]. |
Beta Was this translation helpful? Give feedback.
-
function makeEditable(row: Row, col: ColumnType) { if ([UITypes.SingleSelect].includes(col.uidt as UITypes)) { return (editEnabled.value = true) What I mean is that the above code is still editable when the type is SingleSelect. But if the type is changed to SingleLineText, it is not editable. Where else should I modify the code? |
Beta Was this translation helpful? Give feedback.
-
No, the SingleSelect is still editable. Has anyone found this problem? |
Beta Was this translation helpful? Give feedback.
-
I found that under editor permissions, users can select from the table drop-down box. But under viewer permissions, users cannot. I now want to disable the drop-down box selection function under editor permissions as well. Does anyone know which file I need to modify?
Beta Was this translation helpful? Give feedback.
All reactions