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

Teams logic with apps engine #119

Open
inaferando opened this issue Apr 16, 2019 · 2 comments
Open

Teams logic with apps engine #119

inaferando opened this issue Apr 16, 2019 · 2 comments
Labels
📖 more info needed We need more information before we can address these.

Comments

@inaferando
Copy link

We use single Rocket Chat instance to communicate with several user teams. Our main requirement is that users from different teams should not be able to create chats with each other. Still, there are some admin-like users that can find any user from any team and start chat with him. The information about team is included into user name like "team1_user1", "team1_user2" etc. Admin users have no "teamX_" component in the user name.

RC has no such functionality out of box. To achieve our requirements we edit the source code and prepare custom build.

We edit the following core functions

findByNameAndTypesNotContainingUsername()
findUsersNotOffline()
findByActiveUsersExcept()

and some modules that invoke these function.
Currently Apps engine does not allow to override these functions. Can it be done in future?

Also there is an old issue related to this topic:
RocketChat/Rocket.Chat#658

Probably teams functionality will not be implemented in the core RC because there is no global understanding how it should work. So, we're looking for more flexible (that code edit) way to apply our patch.

@graywolf336
Copy link
Contributor

Could you use the custom data for each user and then listen to the room events? Or if you went full out Apps, you could store all the data as persistent data in the App and then just listen and prevent users creating rooms with other team members.

It could require adding new events for when a new room is creating, but that wouldn't be hard in adding to the Apps framework.

@graywolf336 graywolf336 added the 📖 more info needed We need more information before we can address these. label Jun 7, 2019
@inaferando
Copy link
Author

Prevent creating rooms between users from different teams is necessary, but not enough. We'd like to listen and override server response when some user is searching for another user. In fact, we want to override database query to narrow the search to one team. Is it possible with Realtime API or Apps engine @graywolf336 ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
📖 more info needed We need more information before we can address these.
Projects
None yet
Development

No branches or pull requests

2 participants