* fixed permissions issues at member level
This commit is contained in:
Sebastian Marcet 2014-12-09 15:05:46 -03:00
parent 9204d782cc
commit b7ba60864a
2 changed files with 14 additions and 0 deletions

View File

@ -514,6 +514,10 @@ class Company extends DataObject implements PermissionProvider {
}
}
}
else{
DB::query("DELETE FROM Company_Administrators WHERE CompanyID={$this->ID} AND MemberID={$member->ID};");
DB::query("INSERT INTO Company_Administrators (GroupID,CompanyID,MemberID) VALUES (0,{$this->ID},{$member->ID});");
}
}
}

View File

@ -255,5 +255,15 @@ class MemberDecorator extends DataExtension {
}
return $res;
}
public function canView($member = null) {
$res = Permission::check("EDIT_COMPANY");
return $res;
}
public function canEdit($member = null) {
$res = Permission::check("EDIT_COMPANY");
return $res;
}
}