This topic is locked
[SOLVED]

 How Security API really works in PHPRunner?

8/29/2017 2:49:50 AM
PHPRunner General questions
romaldus author

I use Dynamic Permission and in user table i have "expire date" field.

What i want to achieve is: If expire_date value in user table sales[size="2"] table. [/size]
Following the sample codes from PHPRunner manual , i tried to use setPermissions function in after successfully login event and not work in my project:
[size="2"]

if($data["expire_date"] >= now())

{

$rights = Security::getPermissions($sales);
$rights["A"] = true;
Security::setPermissions($sales, $rights);

}

[/size]

Sergey Kornilov admin 8/29/2017

I think this is what you looking for:

if($data["expire_date"] >= now())

{

$rights = Security::getPermissions("sales");
$rights["A"] = true;
Security::setPermissions("sales", $rights);

}
romaldus author 8/30/2017



I think this is what you looking for:

if($data["expire_date"] >= now())

{

$rights = Security::getPermissions("sales");
$rights["A"] = true;
Security::setPermissions("sales", $rights);

}



Thank you very much. Perfect <img src='https://asprunner.com/forums/file.php?topicimage=1&fieldname=reply&id=83090&image=1&table=forumreplies' class='bbc_emoticon' alt=':)' />