Site Tools


Hotfix release available: 2025-05-14b "Librarian". upgrade now! [56.2] (what's this?)
Hotfix release available: 2025-05-14a "Librarian". upgrade now! [56.1] (what's this?)
New release available: 2025-05-14 "Librarian". upgrade now! [56] (what's this?)
Hotfix release available: 2024-02-06b "Kaos". upgrade now! [55.2] (what's this?)
Hotfix release available: 2024-02-06a "Kaos". upgrade now! [55.1] (what's this?)
New release available: 2024-02-06 "Kaos". upgrade now! [55] (what's this?)
Hotfix release available: 2023-04-04b "Jack Jackrum". upgrade now! [54.2] (what's this?)
Hotfix release available: 2023-04-04a "Jack Jackrum". upgrade now! [54.1] (what's this?)
New release available: 2023-04-04 "Jack Jackrum". upgrade now! [54] (what's this?)
Hotfix release available: 2022-07-31b "Igor". upgrade now! [53.1] (what's this?)
Hotfix release available: 2022-07-31a "Igor". upgrade now! [53] (what's this?)
New release available: 2022-07-31 "Igor". upgrade now! [52.2] (what's this?)
New release candidate 2 available: rc2022-06-26 "Igor". upgrade now! [52.1] (what's this?)
New release candidate available: 2022-06-26 "Igor". upgrade now! [52] (what's this?)
Hotfix release available: 2020-07-29a "Hogfather". upgrade now! [51.4] (what's this?)
New release available: 2020-07-29 "Hogfather". upgrade now! [51.3] (what's this?)
New release candidate 3 available: 2020-06-09 "Hogfather". upgrade now! [51.2] (what's this?)
New release candidate 2 available: 2020-06-01 "Hogfather". upgrade now! [51.1] (what's this?)
New release candidate available: 2020-06-01 "Hogfather". upgrade now! [51] (what's this?)
Hotfix release available: 2018-04-22c "Greebo". upgrade now! [50.3] (what's this?)
Hotfix release available: 2018-04-22b "Greebo". upgrade now! [50.2] (what's this?)
multiple_group_owners

Requirements

  • A group can have multiple group owners .
  • Active members can become group owners.
  • A group owner can add and remove himself and other members as/from owners .
  • A group owner can cancel his own membership and other owner’s membership aswell .

Present Design

  • Single group owner for each group .
  • Group owner info only present in Groups model as owner_id column.

Implementation

Approach

  • Handle the multiple group ownership privilege through group_membership model by adding an 'is_owner' column (type :boolean) in group membership model .
    • Members controller ⇒ add_to_group_owners action : updates the 'is_owner' flag of the respective membership record to true to grant group ownership privilege .
    • Members controller ⇒ remove_from_group_owners : updates the 'is_owner' flag of the respective membership record to false to remove group ownership privilege .
  • All group ownership related scenarios (for privileges to the group owner) and checks are now done through group_membership model (in contrast to referring the groups model under present implementation) .

Model Level Changes

The following methods were added in groups model to handle addition and removal of group members as owners .

  add_as_owner
     Updates the is_owner column of membership record to true.
  
  remove_as_owner
     Updates the is_owner column of membership record to false.

The following columns are added in existing tables :

Table name - group_membership

Column_name type Description
is_owner boolean when set indicates a member with owner privilege and when unset indicates a normal group member

Associations modified :

 User model :
 has_many :owned_groups, :through => :memberships , :source => :group , :conditions => ['is_owner = ?',true], :foreign_key => 'user_id'
 

Work Flow

  • Once a user creates a group , the membership record is created with the is_owner flag set to true .
  • An owner has the privilege to add other active members as owners or remove them from the owner list .
  • If a member is already a member of the group the 'Add to group owners' link changes to 'Remove from group owners'.
  • If the member is the only owner of the group , the 'Cancel' and 'Remove from group owners' links are disabled for him.
  • Owner being a group member also gets enrolled in the In Person Events → auto enroll option.

Note

  • User suspension and trasfering ownership scenario from Manage Site → User Management :
    • If the owned group of the user have multiple owners them the ownership of the groups are not changed .
    • If the owned group of the user do not have multiple owners , the the ownership is changed from transferror(current owner) to transferee(new owner) .
multiple_group_owners.txt · Last modified: 2018/08/31 16:16 (external edit)