Two participants in the UB usability testing found admin/user/roles confusing because the "edit role" link comes before "edit permissions." Here's a stab at moving things around on the page.

Before:

Only local images are allowed.

After:

Only local images are allowed.

CommentFileSizeAuthor
#84 roles-page.png43.83 KBDavid_Rothstein
#70 drupal_role_locked_fix.patch933 bytesquicksketch
#68 drupal_role_locked_fix.patch933 bytesquicksketch
#59 393406_roles-overview_59.patch2.26 KBstBorchert
#59 393406_roles-overview_59.png74.9 KBstBorchert
#57 393406_roles-overview_57.patch1.32 KBstBorchert
#57 393406_roles-overview_57.png76.88 KBstBorchert
#56 393406_roles-overview_56.png23.66 KBstBorchert
#52 edit-role-393406-52.patch3.49 KBDavid_Rothstein
#52 before.png51.85 KBDavid_Rothstein
#52 after.png52.06 KBDavid_Rothstein
#47 role_cleanup.patch13.38 KBmichaelfavia
#42 user_roles_cleanup.patch17.27 KBcatch
#42 roles.png37.4 KBcatch
#41 inline_permissions.png147.52 KBmichaelfavia
#39 mistake.png148.38 KBmichaelfavia
#38 user_roles_cleanup.patch16.28 KBcatch
#36 user_roles_cleanup.patch15.98 KBmichaelfavia
#36 rolesUI.png147.71 KBmichaelfavia
#36 rolesUI_add_edit.png123.91 KBmichaelfavia
#23 rolesUI.png154.35 KBmichaelfavia
#23 rolesUI_add_edit.png118.52 KBmichaelfavia
#23 user_roles_cleanup.patch14.26 KBmichaelfavia
#20 393406-admin_user_roles_cleanup-20-d7.patch11.64 KBFreso
#14 user_roles_cleanup.patch11.21 KBmichaelfavia
#6 393406-edit_and_delete_role_with_help-6.patch10.97 KBFreso
#5 edit_and_delete_role_with_help.patch10.48 KBmichaelfavia
#4 edit_and_delete_role_with_help.patch6.08 KBmichaelfavia
#4 role_page.png145.17 KBmichaelfavia
#4 confirmationpage.png118.07 KBmichaelfavia
#3 edit_role_with_help.patch3.14 KBmichaelfavia
edit-role-after.png19.04 KBksenzee
edit-role-before.png17.9 KBksenzee
edit-role.patch1.16 KBksenzee
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

ksenzee’s picture

Status: Active » Needs review

If we adopt the "rename or delete role" text, we'll also need to change the help text on that page that says 'To delete a role choose "edit".'

catch’s picture

Looks good. Tagging.

michaelfavia’s picture

FileSize
3.14 KB

Removed help section as it is very obvious what the button does now To be honest though id be more in favor of adding a column on this table and providing both "Rename" and "Delete" as links instead on this page. Thoughts?

michaelfavia’s picture

Ok so this is a very rough implementation of it. i need to standardize te rename and edit forms and maybe combine them like they were before info one form handler. BUt ui just wanted to show what i meant.

This patch:
* removes the help text because it is obvious now
* breaks out "edit role" into 2 columns: "rename role" and "delete role"
* adds a confirmation page when you click delete role to prevent catastrophic data loss and return you to the roles page.

I dont like the way im doing this right now but i wanted to post ity before i took off for the day. Ill probbaly recombine the rename and delete forms back into the "user_admin_role() form and cleanup the paths if everyone likes the idea in the first place.

Attached is pacth and picture.

michaelfavia’s picture

Ok. Rerolled and moved everything back into the user_admin_role() and added a switch in each of the form, validate and submit callbacks to test for which form was submitting. Its quite a bit cleaner. I'm thinking this is done unless someone has suggestions or review notes. -mf

Freso’s picture

All patches since #3 have had superfluous and trailing whitespace. The one from #5 additionally adds a bunch of tabs to the mix, as well as uneven indentations. Also, the change to switch-case loops makes #5 a monster to review, compared to earlier patches. I'd consider dropping the switches for now, and if you really think they're needed, make a new issue for them (esp. considering that some of the switches made are completely unrelated to this patch, e.g. the user_admin_role_validate() one).

Anyway, here's a re-roll with a slightly altered logic (ie., containing more of the pre-#5-patch logic) and whitespace fixes.

David_Rothstein’s picture

Looks good in general...

As for the code, I think #4 is actually more along the lines of the right approach. These are totally different forms, so I'm not sure I understand the rationale for putting their submit/validate callbacks all together in one function?

As for the functionality, I think separating out the delete link is definitely good -- it's consistent with the way other places in Drupal do it. I'm not 100% sure about calling the other link "rename role" though. (Contrib modules might easily tack other functionality onto the role edit form, and there are other patches in the queue for D7 core that might do so as well -- e.g., #182023: Add a third default role to core for handling Administrative duties and #256287: Give roles a description value.)

Here is an idea, though. The usability testers clicked on "edit role" expecting to be able to edit the permissions there. So why not give them what they want?? In other words, get rid of the "edit permissions" link altogether -- just have two links, 'edit' and 'delete', and that's it. Clicking on 'edit' would take you to a page where you could rename the role and edit its permissions, on the same page. Would that work?

michaelfavia’s picture

@ Freso: I don't know how the tabs got in there. I use "replace tabs with spaces in eclipse but maybe the PDT auto formatter added them in (i wish it worked better). I'll make sure they aren't there for the next round.

I have a rule that once i get to 2 elseif's i break it out into a switch statement. It just makes life easier. Thats why i changed it.

@David: I agree about breaking these forms apart. It makes it easier to follow the trail for new developers. (i was confused for a bit when i started on these forms so why not). i just put them back together because thats how they were organized originally.

I need to rethink on how to integrate the role descriptions and leave it open for additions by contrib modules. I *really* like the simplicity of calling these things what they are until they need to be overridden and changed by the contrib module that wants to add functionality (for usability sake) but i understand the concerns for sure.

So if there is agreement for breaking out the forms (add, rename, delete) ill do that as a first step and maybe try to roll in webchicks role description so we arent stepping on eachothers toes moving functions around.

Freso’s picture

Status: Needs review » Needs work

@ David_Rothstein:
We don't want users to edit the permissions of the role under "edit role", as that would mean there were two places to change the same settings. It has been suggested (and shot down) before. Try to search around for it on the dev-list or here on drupal.org.

Also, I believe it makes sense to rename the links to "rename" and "delete" roles respectively. If another patch/module comes around, adding more stuff to the "Rename role" form, it should (IMHO) be the responsibility of that patch/module to change the link and other text as well.

Oh. And I also agree on splitting out the forms. My primary goal with #6 was to clean up the whitespace, and I just came across some logic flaws in the patch, due to the removal/restructuring of code which I fixed as well... I didn't think about doing a bigger rewrite of it. But good idea. Michael, are you on it? :)

@ michaelfavia:
Oh, don't get me wrong. I love switch()es. :) The usage of them here just means there's 10 times as much code to review.

David_Rothstein’s picture

We don't want users to edit the permissions of the role under "edit role", as that would mean there were two places to change the same settings. It has been suggested (and shot down) before. Try to search around for it on the dev-list or here on drupal.org.

@Freso: There already are two places to change the same settings. When you click on the "edit permissions" link that is on the role page now, it takes you to a page that allows you to edit the permissions for that role only. That's not the same as the main permissions page at admin/user/permissions.

I searched around a bit and really couldn't find the previous discussion... any pointers?

Anyway, this could be proposed as a followup since it's a bigger change. Splitting up the links as in the current patch is certainly better than the way things are now, so agreed, let's start with that.

David_Rothstein’s picture

yoroy’s picture

Let's omit some needless words here and make "rename role" and "delete role" simply "rename" and "delete".

michaelfavia’s picture

I normally agree with wasteful repetition. Disagree here. Because we have "permissions" in the same table we need to be clear. Especially since it was a point of confusion previously.

michaelfavia’s picture

FileSize
11.21 KB

rerolled to move the forms into their own functions and used arguments to pass the rids, etc. probably needs a little cleanup but anyone have feedback for improving?

Freso’s picture

Status: Needs work » Needs review

@ yoroy:
Apart from what Michael said in #13, this would also be bad with regards to being internationalised. Some languages may have a different form of "rename" and "delete" depending on what is being renamed or deleten (e.g. on the gender of "role"), which in turn might lead to the string "delete" needing 2, 3, 4, n different translations depending on context, but only one translation being possible as the generic string doesn't carry any information on what is being deleted.

Freso’s picture

Status: Needs review » Needs work

The new functions do not have any Doxygen. And I need to test what happens if I should go to ".../rename/foo" or just ".../rename/". With the old logic, this would cause the "add" form to be called instead (ie., if ($rid) { ... } else { /* add role form */ }). However, I am currently unable to install Drupal 7 on my testing server, as my PostgreSQL version is too old... so I'm currently trying to update this.

Also, this will need some tests to go in. Just so you know. :)

catch’s picture

There's an issue for adding context to t() - we should deal with context for translators there - not add extra words to the English interface strings if they aren't needed. For text, I'd go for the screenshot in #4 - but with "permissions", "rename", "delete" (i.e. no 'edit', or 'role' anywhere).

marcus7777’s picture

+1 good stuff ksenzee

David_Rothstein’s picture

I reviewed and tested this patch. It basically works great and is a major code cleanup too. I think it's pretty close to being ready. However, I noticed the following things not yet mentioned above:

  1. Breadcrumbs do not appear correctly on the rename role page. I can't remember off the top of my head which magical menu constant you need to do what you want here (hopefully there is one), but MENU_CALLBACK is the wrong one.
  2. Following up on @Freso's comment, going to "admin/user/roles/rename" works fine, but "admin/user/roles/rename/foo" does not - it gives you a rename form anyway along with a PHP notice. To solve this problem, we should change the menu paths to use '%role' rather than '%' and then create a role_load() function to validate that the role actually exists.
  3. -  $items['admin/user/roles/edit'] = array(
    +  $items['admin/user/roles/rename/%'] = array(
    

    Should we really change from "edit" to "rename" in the URL? Doing it in the user interface text is fine because sites have ways to override that (if they are adding more functionality to the form), but the URL is not something that they can really override. So it seems like this will just lead to the possibility of broken links during the D6->D7 upgrade as well as less flexibility for contrib modules. I'd vote for keeping the URL more general.

  4. In the function user_admin_role(), the PHP Docblock now lists the wrong validate and submit handlers.
  5. +    t('Are you sure you want to delete the role: %title?', array('%title' => $role->name)),
    

    I would change this to: "Are you sure you want to delete the %title role?"

  6. +      $rows[] = array($name, $edit_permissions, l(t('rename role'), 'admin/user/roles/rename/' . $rid), l(t('delete role'), 'admin/user/roles/delete/'.$rid));
    

    Very minor, there should be a space before [edit: and after] the last dot.

Also:

  • Regarding tests, it seems that there aren't any existing ones for the role administration functionality, but I don't think it's fair to ask this patch to add them - this is basically just a user interface change. It looks like those types of tests are being handled over at #300993: User roles and permissions API. Also, trying to write these tests before a good API is in place means that the tests are necessarily going to suck :)
  • Finally, regarding @catch's suggestion in #17, changing "edit permissions" to "permissions" would mean that the "Operations" column would need to be renamed (since they are no longer all verbs), so not sure if that is a good idea or not.
Freso’s picture

  1. This should be fixed in the attached patch.
  2. I didn't have the time to deal with that right now... so still open.
  3. As #2.
  4. As #2 and #3.
  5. Changed.
  6. Fixed. And although minor, still important. Well caught. :)
  7. Even though this might not call for functionality tests, there should still be unit tests to all functions. And I'm not sure if the policy is still as strict (it should be, IMHO), but it used to be that no new function would be allowed without a unit test. And this patch introduces several new functions. (Esp. with #2.)

And I'm off to have dinner. =)

michaelfavia’s picture

Great review guys thank you.

@freso: Ill add doxygen as soon as people actually like the rest of the patch. no need to rewrite it 5 times :).

@david thx for great feedback. Im going to make a number of your suggested changes and also try to incorporate webchicks desire for a role description #256287: Give roles a description value which just wouldnt work well with the current UI.

I think im going to modify this slightly to adopt the look of the Content Types page (admin/build/types). With links for edit delete and permissions after the title and the description. This should add a little uniformity and make it a little easier to add more role based functionality without sacrificing usability out of the box. If anyone has an alternative suggestion im all ears.

Bojhan’s picture

Please supply screenshots of changes.

@michaelfavia Please supply screenshots, of your proposed approach.

michaelfavia’s picture

FileSize
14.26 KB
118.52 KB
154.35 KB

Im not exactly sure why it is so en vogue to run around asking for screen shots on every issue but its getting a little tiresome imo. I attach screen shots whenever applicable and you're always welcome to apply the patch yourself and test/review it and attach them yourself. Short of that it just amounts to comment spam.

That aside.

I altered this patch to:

* include webchicks description fields for roles (since they are so related)
* move "add role" to a local menu task like "content types" does for uniformity
* Added delete link and reordered the operations also allowed description editing on all content types (even protected ones so they can be customized as a site might need to).
* removes description of the default roles since the roles have that now themselves

Because i broke out the add and edit forms from the main page i rolled them together and just used '#default_value' and the presence of $rid (again like the node save operation) to determine if we are adding or editing a role. Also simplified some of the validate logic to reflect this. I still need to add doxygen and ill probably cleanup the existing menu calls but i tink this is now the correct approach. Thoughts?

One remaining bug is that when the "required roles" are edited the disabling of the name field for some reason results in a "required field" error. I havent had a moment to chase it down but i will.

yoroy’s picture

We ask for screenshots because we don't have our own copy of head running and don't know how to apply patches. Each their own expertise. Ours is to analyze how things present themselves in the user interface and if proposed changes enhance the user experience.

Screenshot communicates ui changes things much quicker and clearer then describing them in words. It also widens the audience for review. So, thanks for adding the screenshots. We will keep asking for them though! :-)

- the local task for adding a role adds another click to the process of creating a new role. Consistency is not a reason to make things harder to do. Our local tasks/tabs are notorious for not being seen by users. This is not an improvement.
- Not sure if it's helpful to include webchick's request for a role description in this patch as there's enough to discuss already. I'll let others chime in on that too though.

Freso’s picture

Per webchick's own request, I think we should keep #256287: Give roles a description value out of this issue. Let's keep this one issue. I'm fine with not renaming "edit" to "rename" though, since there is already work in progress on adding more stuff to that page/link/menu entry/form.

Also, either "Operations" is renamed, or "permissions" should stay "edit permissions". And if we're keeping it as that, it should probably be "edit role" instead of just "edit", to make it easier to distinguish between the two "edit"'s.

Finally, this issue was actually originally about moving "edit permissions" before the "edit [role]". The latest patch moves this back again.

michaelfavia’s picture

Title: "Edit role" link is misleading » make roles admin look like content types

Retitled as requested by catch in IRC. Reworks the UI while adding descriptions for the roles as well. This is not a "kitten" issue.

beeradb’s picture

After looking at some screenshots and talking w/ michaelfavia in IRC I like the direction this patch is going. Initially I was against adding a description field, as my 'grand vision' for the role editing pages was to merge it with the role-specific permissions page. That being said, with fields having landed I'd hate to handcuff what people are going to be able to do with this stuff, and having both of these pages merged could make for a cluttered interface quite quickly.

I do think a merging the role name and description into the same column similar to how we handle it on the permissions page would be a good improvement though.

David_Rothstein’s picture

I like the new direction too, although as others have said, it might not be great to do it all at once. The previous patch seemed very close to being RTBC, and the new code could easily be a followup patch after that one.

@yoroy in #24: Screenshots are definitely useful, no argument about that :) But I think the issue being raised was that screenshots should not be viewed as a "service" that people writing patches are expected to provide along with their patch. A screenshot is something that anyone who is interested in the patch can provide in order to help out everyone else who is interested. Also, while doing a patch review, at some point I think it is very useful to have a live installation, rather than just a screenshot. Sometimes issues come up that are only apparent while navigating around the site. Also, screenshots tend to merge together "theme issues" with "page structure issues" and those are not the same thing. For example, it's certainly true from the above screenshot that the "add role" local task/tab is practically invisible, as you said. But how much of that is due to a problem with the Garland theme itself, vs. an actual problem with the navigation model introduced by this patch?

It is a shame that this barrier of applying patches exists, but I don't know if there's an easy way to get rid of it.

yoroy’s picture

yeah understood. Still, if a patch adds something to the ui, it needs a screenshot. Just as writing test is a requirement for code, screenshots are required for ui additions, it just gets the point so much better across, especially in the early stages of a patch, so ideally by the one who writes it because then we still have room to provide feedback and direction.

And for the visibility of the tab, indeed, Garland is the main issue. But introducing an extra click is theme independant and that is my main objection to this change.

Thanks for responding, it's good to learn about our mutual perspectives :)

michaelfavia’s picture

Both catch and webchick are amenable to rolling these into one issue from IRC because they are related.

While i generally agree about the dissapointingly hidden nature of local menu tasks in Garland i dont think that it is a good excuse not to handle the process this way. That is a problem with the theme in specific not the implementation. Adding a role isnt a frequent operation even when auser finds themselves on this page and i dont think the clutter of a full webform on this page helps the cause. Especially as people start adding other fields to roles via Fields API etc in D7. This is how its done for content types and users know and understand that process. Lets unify the UIs for similar task types.

yoroy’s picture

Again, the Garland issue is not my main point. You are hiding an important task behind a button where we currently have a direct way to add a new role in the context. Also, the consistency argument is not that strong at the moment. Context trumps consistency everytime. And if you look at core's poll module, you'll find something similar as what we have here: a text field to add a new item, placed below the table of existing items. It's nice to unify, but let's try and do that using the ui pattern that gets the job done easier/faster.

michaelfavia’s picture

My point was that adding the description field and any additional fields that other contributed modules might want to append will make the current implementation ungainly. My patch reuses the same form for role addition and editing and makes the validation and submission logic on the back end MUCH easier to maintain. You would rather see the role name and description and other added fields rolled into the bottom of the "list of roles" page? You're only saving a single click and youre adding a bunch of confusion for new users in my opinion. Especially if contrib modules add functionality and fields.

yoroy’s picture

Yes, I realize that and that's why it's a pity that these patches were rolled into one. We're quite far removed from the issue that's pointed out in the first post now. Users got confused by the order things are in.

Instead, we're now discussing how to add ui for adding a description. I'd argue that fixing an issue that was found during usability testing is more important than a new feature request that's "nice to have". The "nice to have" one is now making a more important task (add new role) harder to accomplish.

Anyway, let's get some more eyes on this.

catch’s picture

I agree with yoroy - description isn't required, so we could easily bring the old textarea back on that page.

A major issue in testing was that when we present tables of stuff, without a link underneath to add a new role, users read all the way down before getting anywhere near a tab. I don't think this is a problem exclusive to Garland, I think it's because people read down, then want to do something, and then they're left hanging at the bottom of the page. We can have an 'add role' tab as well, but please bring back the textfield in the table.

Freso’s picture

Yes, I realize that and that's why it's a pity that these patches were rolled into one. Yeah. And even if Michael apparently didn't follow the conversation with webchick, I can say that she wasn't convinced with the issue merging (I'd be happy to dig in my logs). I still say we split them up again and focus on the UI at hand, even if we stay clear of renaming to "rename" so both issues can get in more easily (ie., less code to review => better and faster review and response => quicker RTBC => quicker commit). But then, that's just IMHO. :)

michaelfavia’s picture

FileSize
123.91 KB
147.71 KB
15.98 KB

Ok all done from my end. Fixed as requested in #drupal-usability by catch and others. There are a few more improvements id like to make for actually using the role descriptions but ill open issues for those.This is my final patch unless additional changes are required.

Patch notes:
* Moved descriptions under role names to mimic "content type" table display
* The user_admin_role form can be cleaned up a little more if #227966: Use default values to #disabled form fields is fixed but it is only 3 lines.
* added doxygen code comments
* only remaining bug is lack of breadcrumb on edit and delete role but content type doesnt have them either so I'm not considering this a problem

@Freso: Please check your logs next time before you remember something for me. I'm hard working and opinionated, not deceitful.

Mar 09 10:34:29 michaelfavia catch, webchick freso was suggesting that i break this patch apart for the different issues that are VERY interrelated. i dont mind doing so if required but the patch seemed simple enough to me and the solution doesnt break up into good independent chunks
Mar 09 10:36:16 catch michaelfavia: I don't think this is a kittens issue at all - doing it at once seems fine.
Mar 09 10:36:36 catch michaelfavia: just retitle the issue to "make roles admin look like content types".
Mar 09 10:36:55 webchick michaelfavia, I would say keep them separate.
Mar 09 10:37:05 webchick Well. Hrm.
Mar 09 10:37:10 catch hehe.
Mar 09 10:37:13 webchick I see how they kinda cancel each other out.
Mar 09 10:37:25 webchick But is there support for adding descriptions to roles?
Mar 09 10:37:32 webchick That issue has been there for a *very* long time.
...
Mar 09 11:20:41 webchick Ok off the phone now.
Mar 09 11:20:49 webchick What were we talking about again? :D
Mar 09 11:21:02 webchick Oh right. Roles and descriptions and interfaces (oh my!)
Mar 09 11:21:13 webchick michaelfavia, do whatveer catch says. :D

ksenzee’s picture

The "permissions" link is still off to the right, where it confused participants in the usability study. Is there a problem with moving it to the left?

catch’s picture

FileSize
16.28 KB

I think moving it to the left is fine - re-roll with that change, a couple of small comment fixes and a bit of dbtng conversion. There's a couple of insert/update queries which also probably ought to be converted - although as far as I can see they're just moved around rather than added. Otherwise looks great to me

michaelfavia’s picture

FileSize
148.38 KB

Patch above when applied creates this screenshot. I assume this was unintended?

michaelfavia’s picture

I can put hte permissions next to the role name in parenthesis (kind of like content types does for machine name) if we are trying to decrease their exposure here. Im also personally happy to remove them because they are not terribly useful in my opinion now that the "role name" headers jog down with the scrolling page on the permissions page. If we want to keep single role editing functionality we could make the links on the top of the general permissions page goto it.

michaelfavia’s picture

FileSize
147.52 KB

Screenshot of what this would look like sorry for comment spam.

catch’s picture

FileSize
37.4 KB
17.27 KB

Michael, yes, not intended, that'll teach me.

Here's what I meant, with attached screenshot to prove I actually looked at the page before posting the patch this time.

To clarify - everyone who got here wanted to change permissions - but they clicked edit role instead - thinking this would get them to the permissions page (hence this issue being posted originally). I also think it makes sense to keep 'edit' and 'delete' on the right - since that keeps them in the same position as they are on the content types screen. Adding permissions inline makes that one column look a little crowded IMO.

Still needs dbtng update on those queries (if that's the rule at the moment, I'm never sure).

ksenzee’s picture

Putting the permissions link inline could make the original usability problem even worse. If we have an operations column, it should have links to all the operations you can do on that role.

User module dbtng update is a separate issue (#394594: DBTNG: User module) so no need to duplicate efforts here.

michaelfavia’s picture

Status: Needs work » Needs review

Agreed i was just trying to understand what was being suggested. So lacking any further advice and seeing as how we have doxygen, upgrade path and UI reviews and that DBTNG will be handled in that issue, id like to ask for someone to perform a code review if they have a moment. Thx.

Status: Needs review » Needs work

The last submitted patch failed testing.

Dave Reid’s picture

Issue tags: +user roles
michaelfavia’s picture

Status: Needs work » Needs review
FileSize
13.38 KB

Rerolled and lots of edit no longer needed since dbtng update removed.

michaelfavia’s picture

For ease of understanding this patch:
* Adds a role description field to the roles and associated add/edit form
* Reorganizes the roles list to resemble content type admin list
* Adds a delete form and confirmation page similar to taxonomy
* Lets users edit the descriptions of the protected roles but not change their name at this time (for no other reason than historical precedence, this is possible if desired)

yoroy’s picture

Still unhappy that this removes the textfield to directly add a new role on this overview page.

Status: Needs review » Needs work

The last submitted patch failed testing.

Bojhan’s picture

Version: 7.x-dev » 8.x-dev
Category: bug » task

Lets work on this in Drupal 8, doesn't seem viable in this stage of the lifecycle neither very important in terms of proning users with usability issues

David_Rothstein’s picture

Version: 8.x-dev » 7.x-dev
Status: Needs work » Needs review
FileSize
52.06 KB
51.85 KB
3.49 KB

This issue has morphed many times, but for Drupal 7, let's not lose track of the very simple patch that began it.

The attached is a simple reroll of the patch from #3 by @ksenzee and @michaelfavia. I didn't actually do any work here, so I'm almost tempted to just mark it RTBC myself :)

If this goes in, we can then move it back to Drupal 8 for the rest.

Bojhan’s picture

Status: Needs work » Needs review

Can anyone point me out to the rationale why this is good? We seem to change more, then the initial confusion by users.

Dries’s picture

Status: Needs review » Needs work

I'm not a fan of the 'rename or delete' link -- it is inconsistent with the rest of Drupal, and looks a bit weird. We should split it up in two separate links so let's proceed with #43 instead. Thanks!

yoroy’s picture

Status: Needs review » Needs work

current content types screen:
Content types | d7

current roles screen:
Roles | d7

So right now, unpatched, roles admin presents its operations similar to content types screen. And looking around in core, most table listings with operations show the 'edit' link first.

So like in #53, what exactly is being fixed here and why is this better?

stBorchert’s picture

FileSize
23.66 KB

Maybe it would be more clear if "locked" will be removed from column Operations (since it is no operation but a state).

stBorchert’s picture

Status: Needs work » Needs review
FileSize
76.88 KB
1.32 KB

Lets push this somehow.

Dries’s picture

In addition to those changes, wouldn't it make sense to put the 'Add role' button next to the textfield? Right now, the margin is somewhat unnatural.

stBorchert’s picture

Default behavior was to put the button in the "Operations" column.
Here is a patch with the button next to the textfield.

Dries’s picture

#59 looks nicer to me. Thoughts?

mcrittenden’s picture

Agreed, #59 is much more easily understood. Also, subscribe.

aspilicious’s picture

I agree with #59

D7 is so much better then D5 wich i have been using on my website until now...

aspilicious’s picture

Status: Needs review » Reviewed & tested by the community

Tested patch, still works...
Please add this to head before we have to rewrite the patch.

Dries’s picture

Status: Reviewed & tested by the community » Fixed

Committed to CVS HEAD. Thanks.

Dave Reid’s picture

Status: Fixed » Needs work
Issue tags: -Screenshot, -Needs text review, -UBUserTesting2009, -user roles
+++ modules/user/user.admin.inc	27 Dec 2009 22:48:47 -0000
@@ -860,14 +860,14 @@ function theme_user_admin_new_role($vari
+      $rows[] = array(t('!name %locked', array('!name' => $name, '%locked' => t('(locked)'))), '', $edit_permissions);

This should be t('!name <em>(locked)</em>')

t() replacement should only be used for variables and it's perfectly valid to use this kind of HTML inside t(). Doing it incorrectly makes it harder for translators.

Powered by Dreditor.

Dave Reid’s picture

Damnit...preview showed I was going to be adding tags, then it removed them. #$@T%@

quicksketch’s picture

Status: Needs work » Needs review
FileSize
933 bytes

Here's a patch for Dave's requested fix.

David_Rothstein’s picture

Status: Needs review » Reviewed & tested by the community

Makes sense.

quicksketch’s picture

FileSize
933 bytes

Only, how about we fix the XSS in this line while we're here. user_roles() does not sanitize the role name. :P

David_Rothstein’s picture

Also make sense :)

Although, then we will be filtering the hardcoded role names, but not the user-provided ones two lines below that... So it might be better to not worry about that here, and just leave the XSS fixes to #316136: New role name not filtered into admin/user/permissions (which is the main issue dealing with that).

But basically either #68 or #70 looks RTBC.

quicksketch’s picture

I agree, there are a bunch of problems here. Let's solve the minor problem with #68 and worry about the filtering in #316136: New role name not filtered into admin/user/permissions.

realityloop’s picture

Status: Reviewed & tested by the community » Needs work
Issue tags: +Screenshot, +Usability, +Needs text review, +UBUserTesting2009, +user roles

The last submitted patch, drupal_role_locked_fix.patch, failed testing.

mlncn’s picture

Since the patch needed in #68 affects translation anyway, can we change the word? Saying locked really implies that the hard-coded roles can be unlocked (and that the user-created (or install profile created) roles could be locked– which, of course, they cannot be).

How about:

built-in

Bojhan’s picture

Sounds even worse, unless we are talking about a car. Not sure if we want to change this so late in the game though

mlncn’s picture

Status: Needs work » Needs review

Not sure built-in is the right word at all, but "locked" and "default" for these unchangeable roles are the wrong words. But with no ideas much less consensus for another word, the patch from 68 should be committed.

#68: drupal_role_locked_fix.patch queued for re-testing.

yoroy’s picture

Version: 7.x-dev » 8.x-dev
Issue tags: -Screenshot, -Needs text review, -user roles

bump to 8

David_Rothstein’s picture

Status: Needs review » Active

The fix from #68 is already in core.

Setting this back to "active", though, because I'm pretty sure that was just a followup and there was something else bigger that this issue was supposed to still be open for. I don't remember exactly what, though :)

Version: 8.0.x-dev » 8.1.x-dev

Drupal 8.0.6 was released on April 6 and is the final bugfix release for the Drupal 8.0.x series. Drupal 8.0.x will not receive any further development aside from security fixes. Drupal 8.1.0-rc1 is now available and sites should prepare to update to 8.1.0.

Bug reports should be targeted against the 8.1.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.2.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

  • Dries committed 6a7f341 on 8.3.x
    - Patch #393406 by michaelfavia, Freso, catch, stBorchert,...

  • Dries committed 6a7f341 on 8.3.x
    - Patch #393406 by michaelfavia, Freso, catch, stBorchert,...

Version: 8.1.x-dev » 8.2.x-dev

Drupal 8.1.9 was released on September 7 and is the final bugfix release for the Drupal 8.1.x series. Drupal 8.1.x will not receive any further development aside from security fixes. Drupal 8.2.0-rc1 is now available and sites should prepare to upgrade to 8.2.0.

Bug reports should be targeted against the 8.2.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.3.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

David_Rothstein’s picture

Title: make roles admin look like content types » "Edit" links on roles admin page are confusing to users: "Edit permissions" should be the primary link
Version: 8.2.x-dev » 8.3.x-dev
Issue summary: View changes
Issue tags: +Needs backport to D7
FileSize
43.83 KB

Setting this back to "active", though, because I'm pretty sure that was just a followup and there was something else bigger that this issue was supposed to still be open for. I don't remember exactly what, though :)

Well, duh, it's for the original issue described in the issue summary above. That was never fixed.

It's actually even worse in Drupal 8 than Drupal 7, since the secondary links are hidden and hard to find:

So we need to make "Edit permissions" the primary link.

And the "Edit" link should also be renamed back to "Edit role" (like it is in Drupal 7). As discussed earlier in the issue, "Edit" makes no sense here when there are two things that can be edited.

I think anything else discussed above is somewhat out of scope and either already happened elsewhere or could happen in another issue:

  1. I will reopen #256287: Give roles a description value for adding a role description.
  2. I think this (from #7) is worth a new issue if one doesn't exist already:

    Here is an idea, though. The usability testers clicked on "edit role" expecting to be able to edit the permissions there. So why not give them what they want?? In other words, get rid of the "edit permissions" link altogether -- just have two links, 'edit' and 'delete', and that's it. Clicking on 'edit' would take you to a page where you could rename the role and edit its permissions, on the same page. Would that work?

    That would be consistent, for example, with how editing menus / menu links works in Drupal 8.

David_Rothstein’s picture

Issue summary: View changes
Issue tags: +Needs issue summary update

I'm editing the issue summary to change it from Full HTML to Filtered HTML. This will allow people to edit it (and I don't think there was a good reason for it to be Full HTML anymore). It could probably use an update.

  • Dries committed 6a7f341 on 8.4.x
    - Patch #393406 by michaelfavia, Freso, catch, stBorchert,...

  • Dries committed 6a7f341 on 8.4.x
    - Patch #393406 by michaelfavia, Freso, catch, stBorchert,...

Version: 8.3.x-dev » 8.4.x-dev

Drupal 8.3.0-alpha1 will be released the week of January 30, 2017, which means new developments and disruptive changes should now be targeted against the 8.4.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.4.x-dev » 8.5.x-dev

Drupal 8.4.0-alpha1 will be released the week of July 31, 2017, which means new developments and disruptive changes should now be targeted against the 8.5.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.5.x-dev » 8.6.x-dev

Drupal 8.5.0-alpha1 will be released the week of January 17, 2018, which means new developments and disruptive changes should now be targeted against the 8.6.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.6.x-dev » 8.7.x-dev

Drupal 8.6.0-alpha1 will be released the week of July 16, 2018, which means new developments and disruptive changes should now be targeted against the 8.7.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.7.x-dev » 8.8.x-dev

Drupal 8.7.0-alpha1 will be released the week of March 11, 2019, which means new developments and disruptive changes should now be targeted against the 8.8.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.8.x-dev » 8.9.x-dev

Drupal 8.8.0-alpha1 will be released the week of October 14th, 2019, which means new developments and disruptive changes should now be targeted against the 8.9.x-dev branch. (Any changes to 8.9.x will also be committed to 9.0.x in preparation for Drupal 9’s release, but some changes like significant feature additions will be deferred to 9.1.x.). For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

  • Dries committed 6a7f341 on 9.1.x
    - Patch #393406 by michaelfavia, Freso, catch, stBorchert,...

Version: 8.9.x-dev » 9.1.x-dev

Drupal 8.9.0-beta1 was released on March 20, 2020. 8.9.x is the final, long-term support (LTS) minor release of Drupal 8, which means new developments and disruptive changes should now be targeted against the 9.1.x-dev branch. For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

Version: 9.1.x-dev » 9.2.x-dev

Drupal 9.1.0-alpha1 will be released the week of October 19, 2020, which means new developments and disruptive changes should now be targeted for the 9.2.x-dev branch. For more information see the Drupal 9 minor version schedule and the Allowed changes during the Drupal 9 release cycle.

Version: 9.2.x-dev » 9.3.x-dev

Drupal 9.2.0-alpha1 will be released the week of May 3, 2021, which means new developments and disruptive changes should now be targeted for the 9.3.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.3.x-dev » 9.4.x-dev

Drupal 9.3.0-rc1 was released on November 26, 2021, which means new developments and disruptive changes should now be targeted for the 9.4.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.4.x-dev » 9.5.x-dev

Drupal 9.4.0-alpha1 was released on May 6, 2022, which means new developments and disruptive changes should now be targeted for the 9.5.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.5.x-dev » 10.1.x-dev

Drupal 9.5.0-beta2 and Drupal 10.0.0-beta2 were released on September 29, 2022, which means new developments and disruptive changes should now be targeted for the 10.1.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 10.1.x-dev » 11.x-dev

Drupal core is moving towards using a “main” branch. As an interim step, a new 11.x branch has been opened, as Drupal.org infrastructure cannot currently fully support a branch named main. New developments and disruptive changes should now be targeted for the 11.x branch, which currently accepts only minor-version allowed changes. For more information, see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.