access control, grant admin panel access while hiding a collection

default discord avatar
crimsonmutt
3 weeks ago

hi, using the remix-server monorepo, i've spun it up, and added a new user type called content-manager to the select of the

User

role

field, which should see and be able to edit posts and media, but not users, in the admin panel



i've added the role, set the

user@payloadcms.com

user to that role, but it's not working. i need to grant the content-manager users admin access to the Users collection to be able to load the admin UI at all, which makes the content managers see the users collection, which i do not want. they can't save, add or delete, though, which is nice.



as far as i can tell, all /admin users need to have at least read and admin access to the slug provided in

{ admin.user }

of the config object.



how do you get around this to be able to have a superuser which manages other users, and editors which manage only content?



ah ok, need to grant admin, but not read access. a bit counterintuitive but works

    Open the post
    Continue the discussion in Discord
    Like what we're doing?
    Star us on GitHub!

    Star

    Connect with the Payload Community on Discord

    Discord

    online

    Can't find what you're looking for?

    Get help straight from the Payload team with an Enterprise License.