Sha256: bbee94615464aa242955237a9a7f88dc580a85bf8b27093093df1942c5a1f98b

Contents?: true

Size: 390 Bytes

Versions: 5

Compression:

Stored size: 390 Bytes

Contents

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

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

Version data entries

5 entries across 5 versions & 2 rubygems

Version Path
social_stream-base-0.5.2 app/helpers/permissions_helper.rb
social_stream-base-0.5.1 app/helpers/permissions_helper.rb
social_stream-base-0.5.0 app/helpers/permissions_helper.rb
social_stream-0.4.6 app/helpers/permissions_helper.rb
social_stream-0.4.5 app/helpers/permissions_helper.rb