Role Based Workspace

We had the same requirement and did some custom implementation in context of one of our apps:
Our business requirements have been:

  • We need to set per Workspace, which roles can get access to that
    • As a whitelist (means, we manage roles, that get access) → “Visible To Roles”
    • As a blacklist (means, we manage roles, that can NOT get access) → “Hidden to Roles”
    • Special handling for System Managers, they won’t get affected by that, even if they have also one of the black-listed roles assigned
    • Hide section-names, if there are no more workspaces available for the same

What was necessary to do the same?

  1. SetUp DocType to manage all those “Workspace Perms”:
  2. Monkey Patch within frappe/frappe/boot.py to inject our filter within method “load_desktop_data

Result: It’s possible to “hide” all not needed items from “Modules” sidebar

If that would be helpful for you, let me check with my team, if we share this as a separate app or guide you just here through what needs to be done.

11 Likes

Hi @Patrick.St, i think it will be great if you can share as an app as it will also help others who are trying to implement the same. If it is also easier for you to just share the steps that we can follow, we will appreciate it as well

1 Like

would like to see the details to implement in my own app also. many thanks.

hello @Patrick.St can you share as your app to see or guide us to implement this feature

@szufisher yes please. it is great if you share with us we will be gratefull

Hi @gkapswara, @szufisher, @Abdirahmaan,
I have published the app - feel free to test/ improve it: GitHub - pstuhlmueller/workspaceperms: Manage the availability of workspaces within Frappe/ ERPNext (sidebar) based on user-roles

10 Likes

Is a nice feature, why not send a PR?

Already thought about it - will do it if at least 2-3 other users say, that feature is helpful.

3 Likes

To make it more simple, I am thinking to block these 3 system modules: core, custom and integration for non system manager users. this way there is no extra workspace maintenance efforts needed and also will be less confusion for newly created normal users.

1 Like

How do you mean the following?

less confusion for newly created normal users.

For example in our use case, the most users only have 1 workspace, a few have 2-3 workspaces in total based on their role.

Feature is very useful! Please send a PR.

1 Like

The feature is useful. Thanks for your contribution.

1 Like

Its a must feature to build simplicity for end users quickly.it should be part of frappe asap, thanks for wonderful feature

1 Like

Will the user still be able to access the workspaces by using the search bar?

2 Likes

No, the user won’t be able to access the “hidden” workspaces any longer - neither via direct-link, nor via awesome-bar.

5 Likes

Then the app is awesome!!! will give it a run.

1 Like

This is important feature Please send PR it is helphul

1 Like

I tried your good app with latest version 13.11, I applied single role for a workspace but it is still visible to others, so whether we need apply hide for roles if we do not want . Apply for and Hide for , whether both needs to be applied for a workspace.

@Patrick.St pls throw some light

Hi @CA_B.C_Chechani,
not sure if I get the question the right way.

I applied single role for a workspace but it is still visible to others

So you have added a role to the “Hide To Roles” multi-select? Did you run a bench restart afterwards?

Thanks for responding, will look into . Please publish your app at marketplace to get more users use and give feedback to increase trust level and usability.