Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some changes to group saving logic #10664

Merged
merged 5 commits into from
Jan 19, 2017
Merged

Some changes to group saving logic #10664

merged 5 commits into from
Jan 19, 2017

Conversation

hypeJunction
Copy link
Contributor

feat(groups): group ACL name is now always in sync with the group name

Group name changes that take place outside of the groups/edit
action are now correctly reflected in access collections table

feat(groups): group metadata ownership in now in sync with group ownership

Group metadata ownerships is now correctly updated if group
owner changes outside of the groups/edit action

feat(groups): validate container permissions when creating a new group

Makes it easier to supply a container_guid for a new group without having to
replace an entire action.
Makes sure the user can write a new group to container, thus making it
easier to implement more granular controls over who can create new groups


// Update owned metadata
$metadata = elgg_get_metadata([
'guid' => $group->guid,
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could use metadata_owner_guids here, I suppose

$previous_owner_guid = $original_attributes['owner_guid'];

// In addition to standard icons, groups plugin stores a copy of the original upload
$filehandler = new ElggFile();
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't need this anymore. Group icons are already owned by the group.

@mrclay
Copy link
Member

mrclay commented Dec 23, 2016

So far so good

Group name changes that take place outside of the groups/edit
action are now correctly reflected in access collections table
…rship

Group metadata ownerships is now correctly updated if group
owner changes outside of the groups/edit action
Makes it easier to supply a container_guid for a new group without having to
replace an entire action.
Makes sure the user can write a new group to container, thus making it
easier to implement more granular controls over who can create new groups
@hypeJunction hypeJunction changed the title WIP Some changes to group saving logic Some changes to group saving logic Jan 14, 2017
@hypeJunction
Copy link
Contributor Author

I am done with this one.

The upgrade script overlooked the fact that groups plugin kept a copy of the
originally uploaded image. This corrects the issue
@hypeJunction
Copy link
Contributor Author

There was also an issue with group icon upgrade. Adding it to this PR, so we don't have to deal with conflicts later.

@jdalsem jdalsem merged commit fb72ff2 into Elgg:master Jan 19, 2017
@hypeJunction hypeJunction deleted the groups-save branch March 31, 2017 11:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants