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

Add filter to allow/deny @all #3703

Merged
merged 7 commits into from
Jul 6, 2016

Conversation

thomasspiesser
Copy link
Contributor

@RocketChat/core

With this PR, an administrator has the option the deny the use of the @all tag.
bildschirmfoto 2016-07-06 um 09 48 49
Administrators, room moderators and owners are not affected and can still use the @all tag.

When a regular user tries to use it and it is has been denied by the admin, the message is not send and the user is informed about it.
bildschirmfoto 2016-07-06 um 09 49 26

Info: "Alle Benutzer in diesem Raum benachrichtigen ist nicht erlaubt" is the german t9n for "Notify all in this room is not allowed".

@thomasspiesser thomasspiesser changed the title Filter notify all Adds filter to allow/deny @all Jul 6, 2016
@thomasspiesser thomasspiesser changed the title Adds filter to allow/deny @all Add filter to allow/deny @all Jul 6, 2016
@rodrigok
Copy link
Member

rodrigok commented Jul 6, 2016

Awesome, can you add a description for this setting to warn that admins, moderators and owners can still use?

@thomasspiesser
Copy link
Contributor Author

Sure! Where would you like to show this warning?

@danielwegener
Copy link
Contributor

I'd rather like this feature as a mention-all permission.

@rodrigok
Copy link
Member

rodrigok commented Jul 6, 2016

@danielwegener yes, that makes more sense. @thomasspiesser what do you think?

@thomasspiesser
Copy link
Contributor Author

All for it! What would I need to change for that?

@rodrigok
Copy link
Member

rodrigok commented Jul 6, 2016

@thomasspiesser you should use RocketChat.authz.hasPermission(Meteor.userId(), 'mention-all') instead of the setting check and add that permission here https://github.com/RocketChat/Rocket.Chat/blob/develop/packages/rocketchat-authorization/server/startup.coffee

…filter-notify-all

* 'develop' of github.com:thomasspiesser/Rocket.Chat:
  add editable channel descriptions (RocketChat#3705)
  Fix sandstorm WebRTC (RocketChat#3675)
  Subdir images  (RocketChat#3695)
  calls callback also on success (RocketChat#3690)
  don't consider invalid commands to be messages (RocketChat#3698)
  Add hide avatars setting to user preferences
@thomasspiesser
Copy link
Contributor Author

@rodrigok thanks, let me know if i got it right.

@rodrigok
Copy link
Member

rodrigok commented Jul 6, 2016

@thomasspiesser awesome, did you test? I think you should add user by default to the list of roles of that permission.

@thomasspiesser
Copy link
Contributor Author

@rodrigok OK, I added user to the permission default. I did test it and it seems to work like a charm.

@rodrigok
Copy link
Member

rodrigok commented Jul 6, 2016

Awesome, thanks

@rodrigok rodrigok merged commit b93c817 into RocketChat:develop Jul 6, 2016
@marceloschmidt marceloschmidt added this to the 0.36.0 milestone Sep 5, 2016
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 this pull request may close these issues.

4 participants