mirror of
https://github.com/nowcommunity/nowdatabase.git
synced 2026-10-12 19:13:52 +03:00
Edit restricted may only create new references
This commit is contained in:
@@ -70,9 +70,8 @@ export const referencePage = (
|
||||
idFieldName="rid"
|
||||
createTitle={(ref: ReferenceDetailsType) => `${ref.title_primary}`}
|
||||
getEditRights={(user: UserState) => {
|
||||
// TODO check if these are right. Can all groups (except readonly) delete references?
|
||||
if ([Role.Admin, Role.EditUnrestricted].includes(user.role)) return fullRights
|
||||
if (user.role === Role.ReadOnly) return limitedRights
|
||||
if (user.role === Role.EditRestricted) return { new: true }
|
||||
return noRights
|
||||
}}
|
||||
/>
|
||||
|
||||
Reference in New Issue
Block a user