Module: PermissionsHelper

Defined in:
app/helpers/permissions_helper.rb

Constant Summary collapse

DEFAULT_PERMISSIONS =
[
  [ "read",    "activity" ],
  [ "create",  "activity" ],
  [ "follow", nil ],
  [ "represent", nil ]
]

Instance Method Summary collapse

Instance Method Details

#default_permissionsObject



10
11
12
13
14
15
# File 'app/helpers/permissions_helper.rb', line 10

def default_permissions
  @default_permissions ||=
    DEFAULT_PERMISSIONS.map{ |p|
      Permission.find_or_create_by_action_and_object *p
    }
end