Have you seen our video tutorials? Check 'em out!

Role based permissions

pepijn - 4 weeks ago

OK so I have an app which defines three roles:

  • user (can view the frontend)
  • admin (really, this is me, the super-admin)
  • country-admin (Should only have access to a few modules)

I'm currently trying to configure the country-admin role, but according to the PyroCMS docs, All authorization services and permissions are bound to the Users Module by default.

Which steps should I take in my Seeder so that:

  • Permissions can be role-based instead of user-based
  • This new country-admin role has access to the admin
  • This new country-admin role only has access to the Pages module, and my custom module, but doesn't have access to any other module.

Answer

huglester - 4 weeks ago

Hello,

Navigate to: http://pinigai.app/admin/users/roles There is a PERMISSIONS button on the right. Does it help? (I have not tested myself)

huglester - 4 weeks ago

Hello,

Navigate to: http://pinigai.app/admin/users/roles There is a PERMISSIONS button on the right. Does it help? (I have not tested myself)

pepijn - 3 weeks ago

@huglester

Whoops! Seems like I missed the obvious... I was looking into the Laravel 5.3 documentation (using Gates & Policies), and then later the pyro docs (user authenticator extension), but it seems I can probalby just define my permissions in config/permissions and then assign them like you suggested! Thanks :)

huglester - 3 weeks ago

There is UI management in the backend also! :) check there too