A Question About Role Management
Question
Application Type
Mobile
Service Studio Version
11.11.2 (Build 43109)

Hello!

My question may be a bit confusing but I hope the example makes sense. 

So lets say for example, there are 3 roles, "Learner", "Teacher", and "Admin".

The Learner can only view and lessons in their own class.

The Teacher can view and add lesson to all classes, but not edit the lessons..

The admin can view and add lessons to all classes, as well as edit lessons (add/remove questions to lessons, etc.)

Should I create separate screens for the different roles, even if some screens are shared among roles (i.e. Home Page can be shared among roles), or should I just have one screen and make different buttons visible according to the Roles?  

For example, is it better to have 3 "Home Page" screens,  each screen for one roll, or is it better to have one "Home Page" screen, but the different buttons are hidden according to the role that is logged in? Is there a right way to do this?

Hope this can be easily understood.

Cheers!

Lucas


Solution

Hi Lucas,

In general, I would say that the answer depends on the “degree” of the potential differences between what each role is able to do or see on the application according to their role.

For example, if they are supposed to be seeing the same contents, and the only difference is that the Admin role has a couple special buttons that should show up (for editing, deleting, etc.), then it might be easier to just add them in the same screen inside an If widget based on a check of that role.

On the other hand, if the differences are substantial; for example, thinking about a Classes screen where a very large portion of the screen should only be seen by a Teacher role, then it might be better to reconsider creating separate screens. Remember that you can also create Blocks to reuse functionality/content that could be applied to several screens.

Let me know if that helps.

Hi @Lucas Nguyen,

The 'Create' and 'Edit' screens can be the same screen (detail screen) where you can check both 'Teacher' and 'Admin' roles but only allow the 'Edit' functionality IF Role is Teacher.

On the 'Home Page' screen you may check all 3 roles and can show/hide specific widgets based on Role as well.

While multiple screens with identical features is achievable by using reusable blocks, I would not suggest it for your scenario based purely on the example/details you have shared.

Regards,


AJ

Solution

Hi Lucas,

In general, I would say that the answer depends on the “degree” of the potential differences between what each role is able to do or see on the application according to their role.

For example, if they are supposed to be seeing the same contents, and the only difference is that the Admin role has a couple special buttons that should show up (for editing, deleting, etc.), then it might be easier to just add them in the same screen inside an If widget based on a check of that role.

On the other hand, if the differences are substantial; for example, thinking about a Classes screen where a very large portion of the screen should only be seen by a Teacher role, then it might be better to reconsider creating separate screens. Remember that you can also create Blocks to reuse functionality/content that could be applied to several screens.

Let me know if that helps.

Hi @Lucas Nguyen,

As per your example it's very simple to maintain all conditions as per user roles in one screen.

Example:

Learner: Can only view Lessons(lessons visibility to all)

Teacher: Can view as well as add new lesson(here you can add one button/link to add new lesson)- set visibile property to teacher and Admin role only

Admin: Can do everything in application- add link to lesson detail page so he can edit existing lesson.

Here I attached simple mobile application in this I mention actions as per your requirements.

Please check attached oml file.


Kind Regards,

Narendra Bhangale.

OnlineStudyAdda.oml

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.