backup: add api "enablerestore"
This commit is contained in:
parent
db7954ee31
commit
d04484a2eb
@ -280,7 +280,7 @@ namespace ASC.Data.Backup
|
||||
return result;
|
||||
}
|
||||
|
||||
private void DemandPermissionsRestore()
|
||||
public void DemandPermissionsRestore()
|
||||
{
|
||||
PermissionContext.DemandPermissions(SecutiryConstants.EditPortalSettings);
|
||||
|
||||
|
@ -267,5 +267,24 @@ namespace ASC.Data.Backup.Controllers
|
||||
|
||||
return BackupHandler.GetTmpFolder();
|
||||
}
|
||||
|
||||
///<visible>false</visible>
|
||||
[Read("enablerestore")]
|
||||
public bool EnableRestore()
|
||||
{
|
||||
try
|
||||
{
|
||||
if (CoreBaseSettings.Standalone)
|
||||
{
|
||||
TenantExtra.DemandControlPanelPermission();
|
||||
}
|
||||
BackupHandler.DemandPermissionsRestore();
|
||||
return true;
|
||||
}
|
||||
catch
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user