Currently:



Roles allow you to fine tune the security and administration of Drupal. A role defines a group of users that have certain privileges as defined on the permissions page. Examples of roles include: anonymous user, authenticated user, moderator, administrator and so on. In this area you will define the names and order of the roles on your site. It is recommended to order your roles from least permissive (anonymous user) to most permissive (administrator). To delete a role choose "edit role".

Drupal has three special user roles:

    Anonymous user: this role is used for users that don't have a user account or that are not authenticated.
    Authenticated user: this role is automatically granted to all logged in users.
    Administrator role: this role is automatically granted all new permissions when you install a new module. Configure which role is the administrator role on the Account settings page.


Proposed:

A role defines a group of users that share the same privileges. These privileges are defined on the permissions page. It is recommended to order roles from least permissive (anonymous user) to most permissive (administrator).

- Tightened up the basic info and removed the examples. The default available roles are the real examples
- We shouldn't have to explain how to delete a role
- The 3 special roles are explained in the help for user module

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

yoroy’s picture

Status: Active » Needs review
FileSize
7.08 KB

Lets see…

Status: Needs review » Needs work
Issue tags: -Usability

The last submitted patch, 1952064-1-roles-help-text.patch, failed testing.

sun’s picture

Status: Needs work » Needs review
Issue tags: +Usability

#1: 1952064-1-roles-help-text.patch queued for re-testing.

sun’s picture

Title: Reduce amount of help text on the roles page » Shorten help text on User Roles page

Thanks! I also wanted to create an issue for that, but always forgot to do so...

Two issues:

1) I think the very first mentioning of the term "role" should be "user role". That is, because a "user role" is linguistically and technically more specific and provides more topical context than just "role". Later on, we can just use "role".

2) What always annoyed me about this help text (since D6) is that the point about "order from least to most permissive" is absolutely unclear, since it does not state in which order — top to bottom or bottom to top?

3) Lastly, I've no idea where the ordering of roles is actually used, and whether it has any (serious) impact on anything... — off-hand, I only know about two places where a list of roles appears: 1) In the table header on the Permissions page. 2) Checkboxes on the user account edit form. The order for both of these is purely cosmetic. I don't know whether there are other places and whether the order is of any technical importance.

Status: Needs review » Needs work

The last submitted patch, 1952064-1-roles-help-text.patch, failed testing.

yoroy’s picture

1. Agreed
2. I read that as least to most == from left to right
3. I think the ordering helps make the permissions page, when viewed for all roles more scannable/readable, I suspect that's why that suggestion is there and that's why I left it in.

The changed text seems to break some tests.

sun’s picture

Status: Needs work » Needs review

The test failures are random and can be safely ignored here. Let's move forward with doctoring on the copy text. :)

sun’s picture

Status: Needs review » Needs work

eeek, no, the test failures are real — the patch in #1 is not the patch you wanted to upload ;)

yoroy’s picture

Status: Needs work » Needs review
FileSize
2.93 KB

Ha. Probably forgot to git reset after another patch. This patch tackles only point 1.

oresh’s picture

The patch successfully applied, no grammatical errors found.
+1

andypost’s picture

+++ b/core/modules/user/user.moduleundefined
@@ -68,13 +68,7 @@ function user_help($path, $arg) {
-      $output .= '<li>' . t("Anonymous user: this role is used for users that don't have a user account or that are not authenticated.") . '</li>';
-      $output .= '<li>' . t('Authenticated user: this role is automatically granted to all logged in users.') . '</li>';

I think this text very useful. This roles could not be deleted and their behaviour is special

oresh’s picture

totally agree with @andypost , we should probably add that back. Maybe we can concatenate the lines into something like :
'user is granted Authenticated or Anonymous user role automatically whether he is logged in or not'.

yoroy’s picture

Status: Needs review » Needs work

ok

babruix’s picture

Assigned: Unassigned » babruix
babruix’s picture

Status: Needs work » Needs review
FileSize
8.43 KB

New patch with token replaced and usage of \Drupal::url()

babruix’s picture

Interdiff from comment #9

Status: Needs review » Needs work

The last submitted patch, 1952064-15-user-roles-help.patch, failed testing.

babruix’s picture

Status: Needs work » Needs review
FileSize
8.61 KB
jhodgdon’s picture

Status: Needs review » Needs work

We have a separate issue where the help for the user module as a whole is being edited. This patch should only address changes to the help on the Roles page.
#2103043: Review hook_help for the user module
If you want to make edits to the main help text only, then close this issue as a duplicate and make the changes on the other issue please.

And can someone update the user summary and the title here? The title/summary imply we want to shorten the roles page, but this patch is adding a new line to the help and not making it shorter in the way described. Why?

Note: I just found this issue today so all I read was the summary and the latest patch.

jhodgdon’s picture

We just had a change to hook_help, on this issue: #2183113: Update hook_help signature to use route_name instead of path.

Here is the change record: https://drupal.org/node/2250345

This patch will need a reroll for this change.

Also the other issue about the user module help has been finished.

babruix’s picture

Assigned: babruix » Unassigned
Status: Needs work » Needs review
FileSize
2.31 KB

This patch contains changes to user roles help only.

babruix’s picture

Corrected patch. Shouldn`t we fix all url() calls here?

jhodgdon’s picture

Status: Needs review » Needs work

Thanks! This patch looks good. And yes, if you could go through all of user_help() and fix the url() calls (which we missed in the previous issue), that would be great!

Also, there were several suggestions made on this help text in previous comments... Maybe comments #11/12 should be addressed, so that we explain a bit about the special Anonymous and Authenticated roles? The idea of help on top of pages should be to explain concepts that are not obvious, and I think this qualifies.

Also, maybe (reading through the comments about ordering above) instead of suggesting a particular ordering, we should just say that the order here will be used as the column order on the Permissions page? That will tell people why they would want to put them in order.

babruix’s picture

Status: Needs work » Needs review
FileSize
4.05 KB

Added text from #12 and converted missed url() calls.

jhodgdon’s picture

Status: Needs review » Needs work

Thanks, looking pretty good. A few things to fix:

a) On permissions page:

See the <a href="@role">Roles</a> page to create a role ... array('!role' => 

The a href needs to be !role here

b) On permissions page:

Authenticated Users and Administrators

The actual names of these roles are "Authenticated user" and "Administrator". We need to refer to them how the user sees them (same on the Roles page).

c) On roles page:

User is granted Authenticated or Anonymous user role automatically whether he is logged in or not

This is not clear. I think I would say something more like: "Users who are not logged in have the Anonymous user role. Users who are logged in have the Authenticated user role, plus any other roles granted to their user account.".

mparker17’s picture

Assigned: Unassigned » mparker17

I can help with this.

mparker17’s picture

Feedback welcome!

jhodgdon’s picture

Status: Needs review » Needs work

Looks pretty good, thanks!

A few nitpicks:
a)

(See the <a href="!role">Roles</a> page to create a role).

The . should be before the ) since the whole sentence is parenthetical.

b)

... Authenticated user role will be given to any user who can log into your site.

Technically it is not any user who *can* log in, but any user who *is* logged in.

c)

 You can make any role the Administrator role for the site, meaning this will be granted all new permissions automatically. You can do this on the <a href="@settings">User Settings</a> page.

Can these two sentences be combined? Seems choppy.

d)

It is recommended to order your roles from least permissive (anonymous user) to most permissive (administrator).

These roles should be capitalized same as they appear on the Roles page.

mparker17’s picture

Status: Needs work » Needs review
Issue tags: +Novice
FileSize
4.33 KB
4.03 KB

This should address the feedback in #28.

Feedback welcome!

mparker17’s picture

Whoah, the interdiff from #29 didn't work. :S I'll generate a different one... sorry about that.

jhodgdon’s picture

Issue tags: +Needs manual testing

That's OK about the interdiff, it's a small patch anyway.

Anyway, this text looks good to me. We probably need a manual test to make sure:
- The links all work
- The UI text (page names, role names, etc.) in the help matches what you see. I'm a bit concerned about page names ... for instance the Permissions page is probably capitalized, and the "User settings" page probably does not have two capital letters in its name?

mparker17’s picture

Status: Needs review » Needs work

I can't RTBC this because I helped write a patch; but I will look into the page names, role names etc. right now.

mparker17’s picture

Status: Needs work » Needs review
FileSize
9.36 KB
3.21 KB
8.24 KB

Manual testing has verified all the links work. I've fixed the inconsistencies with page names.

Note the interdiff-27-29 file is a replacement for the broken interdiff in #29.

jhodgdon’s picture

Status: Needs review » Needs work

Thanks! This looks really good, and I was surprised (and pleased) to see that you went back to the main hook_help text and updated it too.

I only have one concern now. The Standard install profile creates a role called "Administrator", which is also set to be the "Administrator role". (The Minimal install profile does not create this role, and no role is set to be the "Administrator role".) Anyway... this is a confusion of names/terms, between the specific name of the role that is created by some install profiles, and the setting that says "which role should automatically get new permissions when modules are enabled". I don't think the help text makes this distinction clear, and I also think it implies that "Administrator" is on the same footing as "Authenticated user" and "Anonymous user" -- which isn't true, since auth/anon exist for any Drupal install, and admin is only created by some install profiles.

I'm not sure how to fix this right now but... I think something needs to be done?

mparker17’s picture

Status: Needs work » Needs review
FileSize
9.47 KB
7.54 KB

I re-worded the text so it sounds like the Administrator role may or may not be on your site.

I also found one more case where the Account settings page was referred to as the User settings page (it was in user.admin_permissions), so I fixed it.

Feedback welcome!

jhodgdon’s picture

Looks pretty good!

I'm not sure about this text about the Administrator role in the main module help:

... users with this role are registered, logged in, and will automatically be assigned any new permissions...

I think we could leave out the "are registered, logged in, and" part? I just went "huh?"

Also filed a follow-up issue:
#2280521: User module help needs improvement

mparker17’s picture

FileSize
9.44 KB
2.59 KB

Removing "are registered, logged in, and" sounds like a good idea to me. See the change in the attached patch.

mparker17’s picture

Hmm...

I'm not really sure what the difference between this patch and #2280521: User module help needs improvement is anymore... I guess this one technically started out as "Shorten help text on User Roles page" but it's kinda evolved into "update hook_help() for the User module" (note that this scope creep is totally my fault: I started changing all the things in #33 — sorry about this :S).

Should I split off the changes not specifically in case 'user.role_list' and put those in #2280521: User module help needs improvement?

jhodgdon’s picture

RE split of issues... I filed a different one because I noticed a couple of things and didn't want to scope creep this issue that was practically done. But yes, probably we should either (a) close the other issue as a dup, change the title of this issue, and officially scope creep it, or (b) move the unrelated changes to the other issue (add them to the summary).

Your choice, since you've been working on this issue. :)

mparker17’s picture

Assigned: Unassigned » mparker17

I'll split it up into two pieces.

mparker17’s picture

Assigned: mparker17 » Unassigned
FileSize
3.44 KB
7.65 KB

Okay, here's only the changes in case 'user.role_list' (I did not make any changes to text; I just split out that particular segment). I'll post the other changes in a patch to the other issue shortly.

paboden’s picture

Last patch looks good. However, you don't need the semicolons after e.g. (http://en.wiktionary.org/wiki/e.g.) and after having a non-drupal person read it, a "top of the list" comment would make it clearer over all.

Maybe something like this:
... It is recommended to order your roles from least permissive at the top of the list (e.g. Anonymous user) to most permissive at the bottom (e.g. Administrator).

prabeen.giri’s picture

Assigned: Unassigned » prabeen.giri

I am going to review this patch!!

jhodgdon’s picture

Can we instead please just remove "e.g." entirely? Just say "for example," and please use a comma after it.

jonreid’s picture

Assigned: prabeen.giri » jonreid

I'm reviewing this at the Austin sprint.

Also updating to rewording the text in the semicolon area.

jonreid’s picture

Assigned: jonreid » Unassigned
FileSize
3.16 KB

Removed the semicolon in the brackets.

(e.g.: Anonymous user) to most permissive (e.g.: Administrator)

Also updated

In this area you will define the names and order of the roles on your site.

to

In this area you will define the names and the display sort order of the roles on your site.

to address comment #42.

HaloFX’s picture

While I am not much a linguist - the patch from #46 applies fine, accomplishes the stated changes, and makes sense to me.

RTBC +1

nflowers1228’s picture

I just tested this and the patch reflects the changes made. Abbreviated text works well.

prabeen.giri’s picture

I am working on the patch #44 to change it to 'for example' instead of "e.g"

I am submitting the patch

Austin Sprint Review!!

Status: Needs review » Needs work

The last submitted patch, 49: user-role-1952064-47.patch, failed testing.

jonreid’s picture

Status: Needs work » Needs review
FileSize
3.18 KB

Fixed the last patch. Updated e.g. to for example

Status: Needs review » Needs work

The last submitted patch, 51: user-roles-1952064-49.patch, failed testing.

jonreid’s picture

Status: Needs work » Needs review
FileSize
2.5 KB

Pulled origin 8.x and rerolled patch.

prabeen.giri’s picture

FileSize
0 bytes

Recreated the patch!!

The last submitted patch, 53: user-roles-1952064-50.patch, failed testing.

prabeen.giri’s picture

FileSize
3.11 KB

Recreated the patch, missed to the upload files!!

weekbeforenext’s picture

Status: Needs review » Reviewed & tested by the community

Reviewed and tested on SimplyTest.me and it looks good. All "e.g." was replaced with "for example, ".

rocketeerbkw’s picture

Thanks @jonried and @prabeen.giri, patch in 56 looks good!

jhodgdon’s picture

Issue tags: -Needs manual testing

Thanks, I agree it looks good!

yoroy’s picture

Status: Reviewed & tested by the community » Needs review

Overall looks good, glad to see this reduced to a single paragraph. But, I find the bit "In this area you will define the names and the display sort order of the roles on your site." very commanding, I think the tone of voice is a bit off here.

Can we tone that down and simplify a bit and change to "Here you define the names and display sort order of the roles on your site."?

yoroy’s picture

Lets see if this works…

jhodgdon’s picture

Status: Needs review » Reviewed & tested by the community

Works for me! Thanks! Good change.

joshi.rohit100’s picture

Status: Reviewed & tested by the community » Needs review
FileSize
4.01 KB
2.44 KB

Changed @setting to !setting. I looked in this https://www.drupal.org/node/1908570 and this mentioned two issues :- https://www.drupal.org/node/2103043 and https://www.drupal.org/node/1952064. One is already in fixed state. So, I think it is better to do this change here.

jhodgdon’s picture

Status: Needs review » Reviewed & tested by the community

OK. It would have been better in this case to file a new issue, because we do not usually like to have patches on issues that contain unrelated changes. But this patch is correct and is a one-character fix, so let's just go with it...

jhodgdon’s picture

Status: Reviewed & tested by the community » Fixed

Thanks again everyone! Committed to 8.x.

  • jhodgdon committed 6357f91 on 8.x
    Issue #1952064 by joshi.rohit100, yoroy, weekbeforenext, prabeen.giri,...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.