0

I'm looking to build the following user structure in Drupal 8

Admin: They can create users of type Foo and Bar.

Foo: They can only create user type Bar.

Bar: They can only create content of a particular content type.

Is this achievable with any current module release? Here are some that I found that could help contribute to a solution:

I've seen profiles, but it has not got an official release yet.. and the feature set doesn't take care of my problem.

Rules, again not a full release but it can trigger events depending on a saved node/ submitted form etc..

Administer users by roles, sounds perfect, not tried and tested.. but noticed again the no official release.

Organic Groups. I don't need to entwine users and nodes (associating content with groups). Which is what I gathered when installing this module

The other option would be to create some custom code that is fired on the submission of a form to add a user via official drupal code... the only problem with this is making sure the code is correct and updated as new release of drupal is released for example. Would this be a good / stable approach?

Can anyone help point me in the direction of a solid solution?

Thanks in advance.

2
  • I think you need to define what you mean by 'only create user Bar' etc... I expect you don't mean it literally! As for 'Bar can only create a particular content-type, do you mean 'only create content of a particular content type, or that Bar can create a content-type with a particular (machine) name?
    – rivimey
    Jul 10, 2017 at 10:03
  • @rivimey Hi, i've updated the questions context, you were exactly right.. I wasn't being explicit enough in regards to the requirements. Any thoughts? BTW Thanks for the feedback!
    – cwiggo
    Jul 10, 2017 at 10:13

1 Answer 1

0

@cwiggo Drupal doesn't really have a concept of a user 'type', just roles that a user can participate in, which I presume you know. You can of course layer 'types' on top of the provided structures using additional fields and tables. You've obviously looked at some of the candidates for helping with this, but have you considered Organic Groups, which might be closer?

As for using projects before stable release: my best suggestion is to dive in and help get a project over the line, perhaps by contacting the module maintainers and offering to help directly. There are however a lot of sites based on 'dev' modules; the maintainers just have to evaluate the code, the issue queue, and the overall risks/benefits and make a decision.

4
  • I'll have a look into organic groups and report back. Thanks.
    – cwiggo
    Jul 10, 2017 at 12:07
  • Yeah.. Organic groups is not a fitting solution, organic group entwines a "group" with drupal nodes with a "subscribe to" button, which is not what I need to cater for. I'm simply aiming towards a solution by which the User A creates the User type B and on login... are directed to a particular node. Maybe a combination of administer user by roles and a form redirect is the simplest solution.
    – cwiggo
    Jul 10, 2017 at 12:53
  • @cwiggio, I'm really not sure I understand what you're after. Perhaps a concrete, fleshed out example would assist.
    – rivimey
    Jul 10, 2017 at 14:33
  • All i'm after is for there to be 3 types of users a) admin which has all permissions. b) user foo with role "foo" who can has ability to create user bar who has limited permissions controlled by admin c) user bar with role "bar" who has limited permissions controlled by admin
    – cwiggo
    Jul 10, 2017 at 15:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.