X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/92242f52971ee8c92d3307707ac63586ea228dfb..0ab8d954ad6d6e4cee5c1238973b8f693c788fcb:/app/abilities/ability.rb diff --git a/app/abilities/ability.rb b/app/abilities/ability.rb index e4b9dcf6b..05f4952ac 100644 --- a/app/abilities/ability.rb +++ b/app/abilities/ability.rb @@ -23,13 +23,13 @@ class Ability can :read, Redaction can [:create, :destroy], :session can [:read, :data, :georss], Trace - can [:read, :terms, :create, :save, :suspended, :auth_success, :auth_failure], User - can [:read, :blocks_on, :blocks_by], UserBlock + can [:read, :create, :suspended, :auth_success, :auth_failure], User + can :read, UserBlock end if user&.active? can :welcome, :site - can :read, :deletion + can :read, [:deletion, :account_terms] if Settings.status != "database_offline" can [:subscribe, :unsubscribe], Changeset @@ -37,12 +37,13 @@ class Ability can [:read, :destroy], :oauth2_authorized_application can [:read, :create, :destroy], :oauth2_authorization can [:update, :destroy], :account + can :update, :account_terms can :read, :dashboard can [:create, :subscribe, :unsubscribe], DiaryEntry can :update, DiaryEntry, :user => user can [:create], DiaryComment can [:make_friend, :remove_friend], Friendship - can [:read, :create, :reply, :inbox, :outbox, :muted, :mark, :unmute, :destroy], Message + can [:read, :create, :mark, :unmute, :destroy], Message can [:close, :reopen], Note can [:read, :update], :preference can :update, :profile @@ -56,7 +57,7 @@ class Ability can [:read, :resolve, :ignore, :reopen], Issue can :create, IssueComment can [:create, :update, :destroy], Redaction - can [:create, :revoke_all], UserBlock + can [:create, :destroy], UserBlock can :update, UserBlock, :creator => user can :update, UserBlock, :revoker => user can :update, UserBlock, :active? => true