Custom component addACL and authorize like com_content - Joomla! Forum - community, help and support


i must missing here. know 1.6 solve need implement little security check now.

below code works expected, authors can perform edit task in com_mycomponent.

code: select all

// setup permissions
$acl   = & jfactory::getacl();
$acl->addacl( 'com_mycomponent', 'edit', 'users', 'author');

// authorize user
$user =& jfactory::getuser();
$access = new stdclass();
$access->caneditown = $user->authorize('com_mycomponent', 'edit');


the below code not work expected. authors still allowed perform edit task in com_mycomponent instead of specific user.

code: select all

// setup permissions
$acl   = & jfactory::getacl();
$acl->addacl( 'com_mycomponent', 'edit', 'users', 'author','mycomponent','own' );

// authorize user
$user =& jfactory::getuser();
$access = new stdclass();
$access->caneditown = $user->authorize('com_mycomponent', 'edit', 'mycomponent', 'own');


i have scoured deal of core files still cannot see how works com_content not mycomponent. know created_by field exists com_content don't see check performed when authorizing user. component not have way of identifying created how implemented?

thanks.

if helps mycomponent follows same security model com_content. if authors article (com_content) have edit access related mycomponent piece.

i have tried

code: select all

$acl->addacl( 'com_mycomponent', 'edit', 'users', 'author','content','own' );


thinking use same logic no.

anyone?





Comments

Popular posts from this blog

Hur installera Joomla på One.com - Joomla! Forum - community, help and support

removing index.php from URL address - Joomla! Forum - community, help and support

「イメージマップのアンカー名には、...」のエラーが出ないようにしたい