Skip to content
Snippets Groups Projects
Commit 8379b35b authored by Maximilian Schaldach's avatar Maximilian Schaldach :cactus:
Browse files

added fallback value

parent 15adfdd4
No related branches found
No related tags found
2 merge requests!278Draft: Test apikey support,!270Resolve "PID Assignment"
......@@ -161,7 +161,7 @@ export default {
* @param {string} entityName - the entity name
* @returns {(visibility: Visibility) => boolean | string} a function that validates the visibility of an entity
*/
validateVisibility (groups: IPermissionGroup[], entityName: string, persistentIdentifier: string | null): (visibility: Visibility) => boolean | string {
validateVisibility (groups: IPermissionGroup[], entityName: string, persistentIdentifier: string | null = null): (visibility: Visibility) => boolean | string {
return function (visibility: Visibility) {
if (visibility === Visibility.Private && persistentIdentifier) {
return `You are not allowed to set the visibility to private when the ${entityName} has a persistent identifier (PID).`
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment