PEAR is archived and read-only

This mirror preserves historical PEAR package releases and metadata so existing references remain available.

Home » Authentication » LiveUser » Bug #926

Feature Request: AddRights Change (BC)

Details

Submitted2004-02-29 14:20 UTC
Fromsimon dot hamilton at ntlworld dot com
StatusBogus
PackageLiveUser
PHP VersionIrrelevant
OSANY
Roadmaps(Not assigned)

Comments

[2004-02-29 14:20 UTC] simon dot hamilton at ntlworld dot com

Description:
------------
It would be nice to have the ability to statically assign the right id in addRight(). This way when building apps we can create a default set of rights that we can rely on every time.

Of course this is only an issue if you're not using the defines, like me, rather I am getting the right ID from the db field of the content I'm fetching.

Here is my proposed change, which won't break BC as far as I can tell:

function addRight($area_id, $define_name, $right_name,
$right_description = null, $right_id = null)
{
if (!isset($right_id)) {
// If right id is not set get next right id
$right_id = $this->dbc->nextId($this->prefix . 'rights');
}

I think this method may also require some additional error checking for duplicates but it would be a nice capability to have.

Thanks.

--
Simon H