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

Batch edit user: remove_from_site_permission and add_to_site_permission fields not applied. #1537

Closed
ManOnDaMoon opened this issue Apr 10, 2020 · 1 comment · Fixed by #1538

Comments

@ManOnDaMoon
Copy link
Contributor

ManOnDaMoon commented Apr 10, 2020

Hello,

I am trying to add new site permissions to users using the Batch Edit form but my changes are not applied.

I've seen that the form fields remove_from_site_permission, add_to_site_permission and add_to_site_permission_role are processed in the following function that is itself not referenced anywhere else, although probably intended to be attached to a listener:

public function batchUpdatePostUser(ZendEvent $event)

Also, I was trying to add these fields to the UserForm myself but maybe this would be a nice addition to core. Adding a user permission to multiple sites is a bit of a tedious task today.

Thanks in advance and have a nice day

Laurent

@ManOnDaMoon
Copy link
Contributor Author

Well, it seems adding the code below to Omeka\Module::attachListeners() does the job of getting back the site permission update feature:

        $sharedEventManager->attach(
            'Omeka\Api\Adapter\UserAdapter',    
            'api.execute.post',
            [$this, 'batchUpdatePostUser']
        );

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant