User's with multiple roles or groups

Hello!

I’m creating an app that will allow users to join different groups and for each group, the user will be assigned different roles… such as member, admin, or observer. Is this type of user structure built in to DreamFactory? I’d really like to use the Filters within Roles -> Access if possible… Such as, User can edit ____ if User is an Admin of Current Group or User can view ____ if User is a Member of Group.

If possible I would like to use Mongo DB. I didn’t know if the Operator could be used to search if a groupid was in an array of user’s groupids?

Thanks for the help and I’m looking forward to learning more about DreamFactory!

1 Like

Not sure of your desired implementation using MongoDB. (Of course you can definitely use MongoDB as a DB service connected to DreamFactory.)

But in DreamFactory 1.x users are limited to a single role. In v2.0 this is expanded to natively take care of an implementation like you described, with multiple roles per user depending on the API key the user uses to make his API call (i.e., a single user may have a different role defined per API key). Sign up for the v2.0 beta testing here if you haven’t already.

Okay awesome @jeffreystables ! I’ve signed up for the beta.

I have another question about scripting. How can I get the user info of user that made a request to the api?

Thanks again!

Depends on from what perspective you are looking to get this information. This recent thread covers most of the possibilities. If you have a use case to add, I recommend replying over there.

"I’m creating an app that will allow users to join different groups and for each group, the user will be assigned different roles… such as member, admin, or observer. Is this type of user structure built in to DreamFactory? "

I normally don’t wake up old threads, this one seemed very applicable thou.

Regards the above question, we are trying the same type of layout. We want to have multiple groups withing a application (think Bitbucket, each repository within Bitbucket can have multiple users) The only way I see it being implemented is by using an App in DreamFactory( as a group) and then apply Roles to that App, this would imply that one has multiple Apps pointing to the same application. This seems a bit clunky is there another way ?

2 Likes

I’m looking for the same thing… What was your approach to solve this. Even there is no option for inheriting roles