parent
9204d782cc
commit
b7ba60864a
@ -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});");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user