Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Users] User Types or something similar #6786

Closed
davidhellmann opened this issue Sep 3, 2020 · 4 comments
Closed

[Users] User Types or something similar #6786

davidhellmann opened this issue Sep 3, 2020 · 4 comments

Comments

@davidhellmann
Copy link
Contributor

My thoughts are to use the Craft Users more often also for Team Members and stuff like that.

Everything in the CP whats a Person should be listed in Users and not within a Custom Sections. I think this is more flexible at the end and also more future proof. And it gives the possibilities to user user roles.

Sometimes it would be nice to have different fieldsets for different users. Something like Entry Types would be nice for users. User Types ;)

But they should not be changeable for the user itself but for Admin Users or Users with the right role.

First thought was to pin it to the user role but a user can have x Roles.

A other Idea is to have an option for fields in the layouteditor (just within users) where I can choose the roles for which the field is visible.

That solves also that some fields are not editable for users. Maybe there are settings that not for the user itself but necessary for the page. Then I select Admin as role for this field.

Questions? Let me know.

@davidhellmann davidhellmann changed the title [Users] Entry Type per user [Users] User Types or something similar Sep 3, 2020
@mmikkel
Copy link
Contributor

mmikkel commented Sep 3, 2020

It's definitely a recurring annoyance that it isn't possible to somehow have different field layouts for different (types of) users, but in my opinion it sounds unnecessarily complex to introduce an additional concept like "user types" on top of user groups. And it doesn't really get around the basic "problem" with users; they aren't necessarily one "type" (hence why it's possible to add a single user to multiple user groups, or none at all).

Personally I think field layout conditionals would be the most flexible and robust solution for this, and I hope that when conditionals finally happen in core, it'll be possible to create rules like "user is in user group A or B", "user has this or that permission" etc, in the Users field layout. (I also hope it'll be possible to hide/show entire field layout tabs using conditionals, which would especially benefit this particular use case IMO)

@davidhellmann
Copy link
Contributor Author

I'm with you. The user type is maybe a bit to complex. But conditionals sounds like the solution for this. +1

@Anubarak
Copy link
Contributor

Anubarak commented Sep 4, 2020

You can have different field layouts for different users by using hooks and events.
I made a page with a booking system and customers have a different field layout than managers and so on.

But I agree, would be cool to have a native function in the cp for that instead of using the event.

@brandonkelly
Copy link
Member

This is a duplicate of #5941. Will be resolved by either field-level permissions (#947) and/or conditional fields (#805).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants