Skip to content

Commit

Permalink
let ROLE_SECRETARIA update Report
Browse files Browse the repository at this point in the history
  • Loading branch information
anderson-mj committed Jan 16, 2025
1 parent 802e76f commit 03b456c
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions app/models/ability.rb
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,6 @@ def initialize_documents(user, roles)
alias_action :execute_now, :execute_now, :notify, to: :update
if roles[:manager]
can :manage, Ability::DOCUMENT_MODELS
cannot :update, Report unless roles[Role::ROLE_ADMINISTRADOR]
end
if roles[Role::ROLE_SECRETARIA]
can :read, [Assertion, Query, NotificationLog]
Expand All @@ -257,7 +256,7 @@ def initialize_documents(user, roles)
cannot [:destroy, :update, :create], Query
end
if roles[Role::ROLE_COORDENACAO]
can :manage, (Ability::DOCUMENT_MODELS - [ReportConfiguration])
cannot :manage, ReportConfiguration
end
cannot [:destroy, :update, :create], NotificationLog
end
Expand Down

0 comments on commit 03b456c

Please sign in to comment.