Rocket.Chat icon indicating copy to clipboard operation
Rocket.Chat copied to clipboard

Add roles and permissions schema

Open vahid-sohrabloo opened this issue 11 years ago • 12 comments

I think we need role for user and access to action (like create channel) based on role.

vahid-sohrabloo avatar Jul 10 '15 16:07 vahid-sohrabloo

Yeah we need this.

This will define some implementations of #168 and #206

sampaiodiego avatar Jul 11 '15 00:07 sampaiodiego

No milestone?

vahid-sohrabloo avatar Jul 19 '15 09:07 vahid-sohrabloo

@rwakida can you help with that?

engelgabriel avatar Aug 19 '15 00:08 engelgabriel

@engelgabriel sure! @Sing-Li used restivus which in turn depends on alanning:meteor-roles. Is meteor-roles a good package to use? Do we have any documentation on what roles/permissions we'll need?

rwakida avatar Aug 19 '15 00:08 rwakida

@rwakida - no documentation that i know of, but if you get it started with a PR or two, I'm sure all the stake-holders will chime in, or make mods to ensure everything works.

The only role that core currently uses, I think, is: [admin]

The extended roles used by REST APIs (that should only be created by an external, non-main-repo tool) are: [testagent, adminautomation]

Some other extended roles that will likely be required in the future: [configurator, provisioningagent]

The extended roles that you mentioned in another thread #455 may be: [botdelegate]

Permissions:

A starter set may be ['post-message', 'edit-message' , 'delete-message', 'create-public-room', 'create-private-room', 'read-all-messages']

Complete permissions set probably takes some thought/design, since the 'expressive-ness' of later 'policies' implementation will critically depend on them.

JMHO

Sing-Li avatar Aug 19 '15 17:08 Sing-Li

Thanks @Sing-Li !

rwakida avatar Aug 22 '15 02:08 rwakida

Hi Sing-Li,

I am very new to Meteor and Rocket.Chat, right now I am in the middle of a task to auto-provision Channel via REST bulk/createRoom API, however I am getting a "You do not have permission to do this." REST response.

Looks to me this would be role/permission related, so would you kindly let me know

  1. how to assign the [testagent, adminautomation] roles to a given user?
  2. which data store does that role/user association info gets persist to?

lostwings211 avatar Sep 02 '15 17:09 lostwings211

@lostwings211 Thanks for the questions. You will have to do this manually at this time. We will have some provisioning and management tools to get this done a little later - once the roles and permission system is in place. The package that we used is the well-known alanning:roles, the association is persisted into the user collection. If you need more details, please join the demo chat on the rocket.chat home page. Our team hangs out there most of the time. I'll be more than glad to help.

Sing-Li avatar Sep 03 '15 11:09 Sing-Li

@rwakida I'm interested in advancing into roles. Have you done anything on that topic? If so, may I continue your work? Thanks!

marceloschmidt avatar Sep 15 '15 03:09 marceloschmidt

@marceloschmidt I'm almost done testing. I'll create a pull request within the next 24 hours...or at least push my branch if I feel it's not ready. Thanks.

rwakida avatar Sep 15 '15 10:09 rwakida

Thank you!

marceloschmidt avatar Sep 15 '15 11:09 marceloschmidt

Hi @marceloschmidt . I created a pull request #818. Thanks!

rwakida avatar Sep 16 '15 06:09 rwakida