[drupal-devel] Permissions aren't transparent
Hi there! One problem with Drupal is the way it handles user permissions. The permissions are attached to the user object but nobody really knows what they do. To find out what a particular permission allows you to do, you often need to have a look at the code. More important: The user does not know which permissions he has. I propose to change the structure of the _perm hook: foo_perm() { return array('create foo', 'admin foo'); } is the current structure. foo_perm() { return array('create foo' => t('Lets you create nodes of type foo.'), 'admin foo' => t('Lets you administer nodes of type foo.') ); } is the proposed structure. The idea is to not only display the additional blurb on the admin permission page, but also on a sub tab of the user profile pages (or directly on /user/n). Opinions? Cheers, Gerhard
foo_perm() { return array('create foo' => t('Lets you create nodes of type foo.'), 'admin foo' => t('Lets you administer nodes of type foo.') ); }
The idea is to not only display the additional blurb on the admin permission page, but also on a sub tab of the user profile pages (or directly on /user/n).
I like this idea. -- Morbus Iff ( dare you overpower my stench of eeeevil? ) Technical: http://www.oreillynet.com/pub/au/779 Culture: http://www.disobey.com/ and http://www.gamegrene.com/ icq: 2927491 / aim: akaMorbus / yahoo: morbus_iff / jabber.org: morbus
Op 18-apr-05 om 15:39 heeft Morbus Iff het volgende geschreven:
foo_perm() { return array('create foo' => t('Lets you create nodes of type foo.'), 'admin foo' => t('Lets you administer nodes of type foo.') ); } The idea is to not only display the additional blurb on the admin permission page, but also on a sub tab of the user profile pages (or directly on /user/n).
I like this idea.
Me too.. a big +1 from me.. We can probably use these permission descriptions also on the 'newly generated helptext pages', I'm trying to work on.. First patch will be available for critisimn soon.. ;-) Steef
On Apr 18, 2005, at 8:09 AM, Gerhard Killesreiter wrote:
return array('create foo' => t('Lets you create nodes of type foo.'), 'admin foo' => t('Lets you administer nodes of type foo.')
The idea is great, but I think we need to consider the wording a bit. "Lets you" won't make any sense to an end user, just to the admin; we don't want to list "create foo" and "admin foo" for the users, because those strings aren't even translated. A couple options: Second person: "You can create nodes of type foo." Third person: "The user can create nodes of type foo." -- Jonathan Chaffer Applications Developer, structure:interactive (616) 364-7423 http://www.structureinteractive.com/
Op 18-apr-05 om 15:51 heeft Jonathan Chaffer het volgende geschreven:
On Apr 18, 2005, at 8:09 AM, Gerhard Killesreiter wrote:
return array('create foo' => t('Lets you create nodes of type foo.'), 'admin foo' => t('Lets you administer nodes of type foo.')
The idea is great, but I think we need to consider the wording a bit. "Lets you" won't make any sense to an end user, just to the admin; we don't want to list "create foo" and "admin foo" for the users, because those strings aren't even translated.
A couple options: Second person: "You can create nodes of type foo." Third person: "The user can create nodes of type foo." I personally like the 'third person' approach, but it should be far more nice if all helptexts of drupal were written from the same perspective.. Currently the way helptexts are written is a little of both worlds and not in a very nice way.. It would be nice if we could get this consistent.
Stefan.
return array('create foo' => t('Lets you create nodes of type foo.'), 'admin foo' => t('Lets you administer nodes of type foo.')
The idea is great, but I think we need to consider the wording a bit. "Lets you" won't make any sense to an end user, just to the admin; we don't want to list "create foo" and "admin foo" for the users, because those strings aren't even translated.
They are translated! But I would also refrain from displaying permission names for end users. Goba
foo_perm() { return array('create foo' => t('Lets you create nodes of type foo.'), 'admin foo' => t('Lets you administer nodes of type foo.') ); }
is the proposed structure.
The idea is to not only display the additional blurb on the admin permission page, but also on a sub tab of the user profile pages (or directly on /user/n).
I think it is a good idea to have permission explained this way (it is much more case sensitive then what we have now with some help texts describing permissions). But if you would like to display this on the user page, it needs to have different wording, like: You are able to create content of type foo. But this does not fit well on the admin page... You are not about to display the name of the permission to the user, are you? Goba
On 18 Apr 2005, at 14:09, Gerhard Killesreiter wrote:
foo_perm() { return array('create foo', 'admin foo'); }
is the current structure.
foo_perm() { return array('create foo' => t('Lets you create nodes of type foo.'), 'admin foo' => t('Lets you administer nodes of type foo.') ); }
As an alternative solution, we could stick to the current implementation but make the names of the permissions more verbose.
The idea is to not only display the additional blurb on the admin permission page, but also on a sub tab of the user profile pages (or directly on /user/n).
I honestly can't think of any site that displays a user his or her permissions. Do you get to see your permissions on amazon.com, ebay.com, slashdot.org, cnn.com? While I could make sense to display one's roles, I'm sceptic about displaying individual permissions. Or were you only going to display these permissions to the administrator? Sure we are trying to fix a problem here? -- Dries Buytaert :: http://www.buytaert.net/
On Mon, 18 Apr 2005, Dries Buytaert wrote:
On 18 Apr 2005, at 14:09, Gerhard Killesreiter wrote:
foo_perm() { return array('create foo', 'admin foo'); }
is the current structure.
foo_perm() { return array('create foo' => t('Lets you create nodes of type foo.'), 'admin foo' => t('Lets you administer nodes of type foo.') ); }
As an alternative solution, we could stick to the current implementation but make the names of the permissions more verbose.
I don't think that is going to be good enough.
The idea is to not only display the additional blurb on the admin permission page, but also on a sub tab of the user profile pages (or directly on /user/n).
I honestly can't think of any site that displays a user his or her permissions.
Are you trying to say you lack imagination? ;)
Do you get to see your permissions on amazon.com, ebay.com, slashdot.org, cnn.com?
No, but does that say it is a bad idea?
While I could make sense to display one's roles, I'm sceptic about displaying individual permissions.
Displaying roles is only usefull if you know what your membership of a role implies.
Or were you only going to display these permissions to the administrator?
That too.
Sure we are trying to fix a problem here?
Yes. I think that the average non-technical Drupal site is a bit underused. I think this is because users (if they aren't familiar with Drupal or with dynamical websites in general) simply don't know that a Drupal site is not only a "read this" site but can also be a "do that" site. There might be several ways to make users more aware of the features a Drupal site offers and I think that this idea is not too bad. But if you don't like the idea at all, I will go ahead with my original plan to make this a contrib module. Cheers, Gerhard
On 18-Apr-05, at 12:39 PM, Dries Buytaert wrote:
Do you get to see your permissions on amazon.com, ebay.com, slashdot.org, cnn.com?
no, but i can't get decent news on any of them either ;) -- James Walker :: http://www.walkah.net/
participants (7)
-
Dries Buytaert -
Gabor Hojtsy -
Gerhard Killesreiter -
James Walker -
Jonathan Chaffer -
Morbus Iff -
Stefan Nagtegaal