1

In my Drupal 8,

  1. Defined New User Role: Manager
  2. Added one user into the role.

I have created a group "Group-x" with corresponding group type "Group-Type-x".

I have updated the permission(view, edit, create) in group type "Advanced outsider permissions" under role Manager.

enter image description here

I can able to create node in group. After creation the node is not listed in the group nodes enter image description here

While checking it, the user is not a member of the group. If I add the user as a member it works fine.

Since I have some thousands of users, every time I can't add it in the group. Can anyone help me out?

Is there is any possibility to add members dynamically while creating node in the group?

As you mentioned configured the outsider permission too.

enter image description here

0

... After creation the node is not listed in the group nodes ... While checking it, the user is not a member of the group. If I add the user as a member it works fine.

I'm reading the above like "For users who are not a member of the group, I want the nodes to be listed in the group nodes also". To implement this:

  • you need to correctly configure the permissions for what in the Group module is called "Outsider".
  • you should NOT have to "add members dynamically while creating node in the group", as in your question (that's not how the Group module is supposed to work or be used).

And to configure the permissions for Outsider, you can use either of those techniques (using Group-Type-x to indicate the type of group):

  • Grant permissions to group role at /admin/group/types/manage/Group-Type-x/permissions, so that a user who is not member of a group, receives the Outsider permissions for that group.
  • If you need to distinguish between outsiders based on what roles they have in the global scope, then (and only then) you should use the "Advanced outsider permissions" page, located at /admin/group/types/manage/Group-Type-x/permissions/outsider. There you'll find all roles as defined in /admin/people/permissions (= the global scope).

With the above in mind, and looking at your question details, it seems to me that there are 2 possible solutions (depending on how you want it to work):

  • If all outsiders should have similar access Then Tune the Group permissions at /admin/group/types/manage/Group-Type-x/permissions.
  • If outsiders of selected global roles should have specific access Then Tune the Group permissions at /admin/group/types/manage/Group-Type-x/permissions/outsider. Note that the image shown in your question (about "Advanced outsider permissions") does not show anything that you already gave some permissions to role "Manager" (there is not even 1 checkmark below role "Manager").

BTW, about your "If I add the user as a member it works fine.": that seems to confirm that you correctly configured your permissions for members of the group. But by "adding a user as a member", such user is no longer considered an "Outsider". So you really need to fix your permissions for "Outsider".

PS: If for Anonymous users you want similar access permissions as for "Outsider", then you also need to configure those permissions via /admin/group/types/manage/Group-Type-x/permissions.

  • Appreciate your reply. From your 2 possible solutions i have an query, if i have another global role called "Developer" who has no access in Group-Type-x and few access(create, edit & view) for "Manager" role. Like you mention if i tune the group permission @ outsider then group nodes where listed in both. I mean group nodes were displaying for Developer & Manager roles – Prasanth R Sep 19 '17 at 15:43
  • @PrasanthR about your "... if i tune the group permission ..." in your previous comment: I think you mean that you do that tuning via "/admin/group/types/manage/Group-Type-x/permissions" in this scenario. And if that is correct, then indeed the nodes will be displaying for both Developer and Manager roles (since "Outsider" mean anybody who is signed in, but not member of the group, so it doesn't matter if they are Developer or Manager). Does this answer your comment here? – Pierre.Vriens Sep 19 '17 at 15:54
  • "so it doesn't matter if they are Developer or Manager" I want "Manager" role user to display the nodes where as other role "Developer" should not. – Prasanth R Sep 19 '17 at 16:41
  • @PrasanthR well, in that case you should be able to somehow configure that similar to what I wrote in my last bullet (using "/admin/group/types/manage/Group-Type-x/permissions/outsider"). Be keep in mind what I wrote in my "note" around there also: your image does not show any checkmark (yet) for any type of permission. Can you update/replace that image (or add an extra image), to show/proof which checkmarks you actually added? – Pierre.Vriens Sep 19 '17 at 16:56
  • Updated the images in my post. Please check it. Also configured outsider. Is that anything to be done further? – Prasanth R Sep 19 '17 at 17:06

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.