Skip to content
This repository has been archived by the owner on Nov 25, 2020. It is now read-only.

Commit

Permalink
Add a paremeter for "updateAdminRights" behaviour, so that at very fi…
Browse files Browse the repository at this point in the history
…rst connexion admin has all repositories accesses
  • Loading branch information
cdujeu committed Jul 30, 2014
1 parent 6948d7e commit 66b0e0b
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
10 changes: 9 additions & 1 deletion core/src/core/classes/class.AuthService.php
Expand Up @@ -595,7 +595,15 @@ public static function getDefaultRootId()
*/
public static function updateAdminRights($adminUser)
{
if($adminUser->personalRole->getAcl('ajxp_conf') != "rw"){
if(!ConfService::getCoreConf("SKIP_ADMIN_RIGHTS_ALL_REPOS")){
foreach (ConfService::getRepositoriesList() as $repoId => $repoObject) {
if(!self::allowedForCurrentGroup($repoObject, $adminUser)) continue;
if($repoObject->hasParent() && $repoObject->getParentId() != $adminUser->getId()) continue;
$adminUser->personalRole->setAcl($repoId, "rw");
}
$adminUser->recomputeMergedRole();
$adminUser->save("superuser");
}else if($adminUser->personalRole->getAcl('ajxp_conf') != "rw"){
$adminUser->personalRole->setAcl('ajxp_conf', 'rw');
$adminUser->save("superuser");
}
Expand Down
1 change: 1 addition & 0 deletions core/src/plugins/core.ajaxplorer/manifest.xml
Expand Up @@ -35,6 +35,7 @@
<global_param name="GZIP_LIMIT" group="CONF_MESSAGE[Compression Features]" type="string" label="CONF_MESSAGE[Gzip Limit]" description="CONF_MESSAGE[If activated, a default limit should be set above when files are no more compressed.]" mandatory="false" default="1048576"/>
<global_param name="ZIP_CREATION" expose="true" group="CONF_MESSAGE[Compression Features]" type="boolean" label="CONF_MESSAGE[Zip Creation]" description="CONF_MESSAGE[If you encounter problems with online zip creation or multiple files downloading, you can disable the feature.]" mandatory="false" default="true"/>
<global_param name="ZIP_ENCODING" expose="false" group="CONF_MESSAGE[Compression Features]" type="string" label="CONF_MESSAGE[Zip Encoding]" description="CONF_MESSAGE[Set up a specific encoding (try IBM850 or CP437) for filenames to fix characters problems during Zip creation. This may create OS-incompatible archives (Win/Mac).]" mandatory="false"/>
<global_param name="SKIP_ADMIN_RIGHTS_ALL_REPOS" expose="false" group="CONF_MESSAGE[Miscellaneous]" type="boolean" label="CONF_MESSAGE[Skip auto-update admin rights]" description="CONF_MESSAGE[If you have tons of workspaces (which is not recommanded), admin users login can take a long time while updating admin access to all repositories. Use this option to disable this step, admin will always have access to the Settings.]" mandatory="false" default="false"/>
<global_param name="NODENAME_MAX_LENGTH" expose="true" group="CONF_MESSAGE[Miscellaneous]" type="integer" label="CONF_MESSAGE[Filename length]" description="CONF_MESSAGE[Maximum characters length of new files or folders]" mandatory="false" default="255"/>
<global_param name="AJXP_TMP_DIR" group="CONF_MESSAGE[Miscellaneous]" type="string" label="CONF_MESSAGE[Temporary Folder]" description="CONF_MESSAGE[This is necessary only if you have errors concerning the tmp dir access or writeability : most probably, they are due to PHP SAFE MODE (should disappear in php6) or various OPEN_BASEDIR restrictions. In that case, create and set writeable a tmp folder somewhere at the root of your hosting (but above the web/ or www/ or http/ if possible!!) and enter here the full path to this folder]" mandatory="false" default=""/>
</server_settings>
Expand Down

0 comments on commit 66b0e0b

Please sign in to comment.