Comments

lpalgarvio’s picture

this and a merge into Drupal 8 (for the permissions system) would be awesome.

edit:
but do recognize that the drag & drop reorder is already there, for the roles and permissions page.
the API i guess isn't...

pfaocle’s picture

Dang, this module is going to be tiny! I've made a start and dumped it on GitHub for now. Role Weights for 7.x should let core do all the work, and simply provide the "API":

- function role_weights_get_weight($rid)
- function role_weights_get_weighted_max($roles, $weight_end = 'lightest')

and core token support.

There is currently no upgrade path bar dropping the role_weights table - I'm unsure if there will be as resetting weights on the new Roles page is super easy.

Also, no Views 3 support. Test away, peoples.

liliplanet’s picture

Thank you for the D7 module, works perfectly !

pfaocle’s picture

Title: Update to Drupal 7.x » Create 7.x-1.x branch; import code from Github
budda’s picture

Priority: Normal » Major

Go on then, release a Drupal 7 version so we can sort out http://drupal.org/node/909638 please :)

rv0’s picture

just stumbled across this, last week I added some views support for core roles and weights
might be useful here, so heres the sandbox http://drupal.org/sandbox/rv0/1937404

pfaocle’s picture

Assigned: Unassigned » pfaocle
Status: Active » Needs work

I've transferred the code from https://github.com/pfaocle/Role-Weights to a new 7.x-1.x branch on this project. Need to test tokens & then I'll tag an official release.

@rv0 - that's great - I'll take a look!

pfaocle’s picture

Issue summary: View changes
Status: Needs work » Fixed
Related issues: +#419846: Improve Views support

Marking this fixed - code is now on 7.x-1.x branch. Views 3/Drupal 7 integration can be followed up at #419846: Improve Views support

Status: Fixed » Closed (fixed)

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