fix permission checks for command forms
This commit is contained in:
@@ -260,6 +260,11 @@ async def process_field_edit_callback(message: Message | CallbackQuery, **kwargs
|
||||
|
||||
# What if user has several roles and each role has its own ownership field? Should we allow creation even
|
||||
# if user has no CREATE_ALL permission
|
||||
|
||||
if callback_data.context in [
|
||||
CommandContext.ENTITY_CREATE,
|
||||
CommandContext.ENTITY_EDIT,
|
||||
]:
|
||||
user_permissions = get_user_permissions(user, entity_descriptor)
|
||||
|
||||
for role in user.roles:
|
||||
|
||||
Reference in New Issue
Block a user