mirror of
https://github.com/opf/openproject.git
synced 2026-06-13 19:20:00 +00:00
Add comment to guide developers
The exception is already intended to nudge devs towards defining a permission. However, first time developers might not realize in which way permissions are defined, even though they can see the location where the exception was raised. This comment is intended to help them find their way.
This commit is contained in:
@@ -85,6 +85,8 @@ module Authorization
|
||||
|
||||
if perms.blank?
|
||||
if !OpenProject::AccessControl.disabled_permission?(action)
|
||||
# See https://www.openproject.org/docs/development/concepts/permissions/#definition-of-permissions
|
||||
# if you are wondering where to define permissions
|
||||
Rails.logger.debug { "Used permission \"#{action}\" that is not defined. It will never return true." }
|
||||
raise UnknownPermissionError.new(action) if raise_on_unknown
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user