|
|
|
|
@ -58,7 +58,7 @@ export default class Config { |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* Get the default expiration date as string |
|
|
|
|
* Get the default link share expiration date as string |
|
|
|
|
* |
|
|
|
|
* @returns {string} |
|
|
|
|
* @readonly |
|
|
|
|
@ -75,6 +75,24 @@ export default class Config { |
|
|
|
|
return expireDateString |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* Get the default internal expiration date as string |
|
|
|
|
* |
|
|
|
|
* @returns {string} |
|
|
|
|
* @readonly |
|
|
|
|
* @memberof Config |
|
|
|
|
*/ |
|
|
|
|
get defaultInternalExpirationDateString() { |
|
|
|
|
let expireDateString = '' |
|
|
|
|
if (this.isDefaultInternalExpireDateEnabled) { |
|
|
|
|
const date = window.moment.utc() |
|
|
|
|
const expireAfterDays = this.defaultInternalExpireDate |
|
|
|
|
date.add(expireAfterDays, 'days') |
|
|
|
|
expireDateString = date.format('YYYY-MM-DD') |
|
|
|
|
} |
|
|
|
|
return expireDateString |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* Are link shares password-enforced ? |
|
|
|
|
* |
|
|
|
|
@ -119,6 +137,28 @@ export default class Config { |
|
|
|
|
return OC.appConfig.core.defaultExpireDateEnabled === true |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* Is internal shares expiration enforced ? |
|
|
|
|
* |
|
|
|
|
* @returns {boolean} |
|
|
|
|
* @readonly |
|
|
|
|
* @memberof Config |
|
|
|
|
*/ |
|
|
|
|
get isDefaultInternalExpireDateEnforced() { |
|
|
|
|
return OC.appConfig.core.defaultInternalExpireDateEnforced === true |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* Is there a default expiration date for new internal shares ? |
|
|
|
|
* |
|
|
|
|
* @returns {boolean} |
|
|
|
|
* @readonly |
|
|
|
|
* @memberof Config |
|
|
|
|
*/ |
|
|
|
|
get isDefaultInternalExpireDateEnabled() { |
|
|
|
|
return OC.appConfig.core.defaultInternalExpireDateEnabled === true |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* Are users on this server allowed to send shares to other servers ? |
|
|
|
|
* |
|
|
|
|
@ -142,7 +182,7 @@ export default class Config { |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* Get the default days to expiration |
|
|
|
|
* Get the default days to link shares expiration |
|
|
|
|
* |
|
|
|
|
* @returns {int} |
|
|
|
|
* @readonly |
|
|
|
|
@ -152,6 +192,17 @@ export default class Config { |
|
|
|
|
return OC.appConfig.core.defaultExpireDate |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* Get the default days to internal shares expiration |
|
|
|
|
* |
|
|
|
|
* @returns {int} |
|
|
|
|
* @readonly |
|
|
|
|
* @memberof Config |
|
|
|
|
*/ |
|
|
|
|
get defaultInternalExpireDate() { |
|
|
|
|
return OC.appConfig.core.defaultInternalExpireDate |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* Is resharing allowed ? |
|
|
|
|
* |
|
|
|
|
|