Commit f681e844 authored by Francesc Guasch's avatar Francesc Guasch
Browse files

Create permission if not defined

parent 07d24bbf
......@@ -592,7 +592,7 @@ sub grant($self,$user,$permission,$value=1) {
return $value if defined $value_sql && $value_sql eq $value;
my $id_grant = _search_id_grant($permission);
if (! defined $value_sql ) {
if (! defined $user->can_do($permission)) {
my $sth = $$CON->dbh->prepare(
"INSERT INTO grants_user "
." (id_grant, id_user, allowed)"
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment