Class: Sipity::Models::GroupMembership

Inherits:
ActiveRecord::Base
  • Object
show all
Defined in:
app/models/sipity/models/group_membership.rb

Overview

Responsible for associating a user to a group.

See Also:

Constant Summary collapse

MANAGER_MEMBERSHIP_ROLE =
TODO:

Codify this behavior in a policy object; But for now this is the intent

A privileged user of the group. They are allowed to alter membership in the group. This does not bleed out into other things. That is to say the ability to manage a group does not and should not infer additional privleges to other policies. From the outside looking in a everyone that is part of a group can fulfill the same external role.

'manager'.freeze
MEMBER_MEMBERSHIP_ROLE =
TODO:

Codify this behavior in a policy object; But for now this is the intent

A member cannot alter membership of themselves or other users that are part of the group.

See Also:

'member'.freeze

Instance Method Summary collapse

Instance Method Details

#set_initial_membership_roleObject (private)


41
42
43
# File 'app/models/sipity/models/group_membership.rb', line 41

def set_initial_membership_role
  self.membership_role ||= MEMBER_MEMBERSHIP_ROLE
end