You are here

public function filedepot_permission_object::setPermissions in filedepot 7

Set the permissions

Parameters

type $view If 1, true, else 0 FALSE:

type $upload If 1, true, else 0 FALSE:

type $upload_direct If 1, true, else 0 FALSE :

type $upload_ver If 1, true, else 0 FALSE:

type $approval If 1, true, else 0 FALSE:

type $admin If 1, true, else 0 FALSE:

File

./permissions.class.php, line 135
permissions.class.php Permissions management class for the Filedepot module

Class

filedepot_permission_object
Holds information about a CIDs permissions

Code

public function setPermissions($view, $upload, $upload_direct, $upload_ver, $approval, $admin) {
  $this->_PermissionArray['view'] = $view == 1 ? TRUE : FALSE;
  $this->_PermissionArray['upload'] = $upload == 1 ? TRUE : FALSE;
  $this->_PermissionArray['upload_direct'] = $upload_direct == 1 ? TRUE : FALSE;
  $this->_PermissionArray['upload_ver'] = $upload_ver == 1 ? TRUE : FALSE;
  $this->_PermissionArray['approval'] = $approval == 1 ? TRUE : FALSE;
  $this->_PermissionArray['admin'] = $admin == 1 ? TRUE : FALSE;
}