59 $allRoles = implode(
",", array_keys(reindexList(
$roles,
"role")));
61 $form =
new AutoForm(
$library,
"POST",
"/action/fileshare/global_permissions_form?document_library_id={$document_library_id}",
"RolePermission_form");
62 $form->ajaxSubmit(
"function(result) {new LibraryManager().permissionsEdited(result);}",
"function() {document.id('{$form->id}_error').set('text','Failed to communicate with server'); }");
64 $permissionsSelect =
new RadioButtonFieldRenderer(
$form,
"read_access",
"Permissions", FileshareManager::getGlobalPermissionOptions());
67 if(preg_match(
"/visitor/",
$library->allow_access))
69 elseif(preg_match(
"/$allRoles/",
$library->allow_access))
78 $read =
$_POST[
"read_access"];
86 $library->filter =
new InclusionFilter(
"allow_access");
94 echo
$form->writeScript();
static getDefaultRole($fileshare=false)
static using()
Import the datamodels, views and manifest for the specified component(s).
static end($message="")
Use this method to terminate execution of a script instead of using the php keywords exit() or die().
static usingFile()
Uses the specified framework file(s) from the framework directory.
$method
Pull out a simple reference to the request method.
const fileshare_only_group_members_read
const fileshare_all_site_members_read
const fileshare_all_visitors_read