Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Workaround until Collectory contacts.json bug is fixed
  • Loading branch information
nickdos committed Dec 6, 2021
1 parent 61a959c commit 646c31f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion grails-app/conf/plugin.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ test.var = "test"
// used to link temporary data resources back to an originating sandbox.
sandbox.uploadSource=''
advancedTaxaField = "taxa" // used in advanced form for the 4 taxa query inputs

alerts.myannotation.enabled = false
clubRoleForHub = "ROLE_ADMIN"
// whether map or list is the default tab to show - empty for list and "mapView" for map
defaultListView = "" // 'mapView' or 'listView'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -393,7 +393,12 @@ class OccurrenceController {

String userEmail = authService?.getEmail()
Boolean isCollectionAdmin = false
Boolean userHasRoleAdmin = authService?.userInRole(CASRoles.ROLE_ADMIN)
Boolean userHasRoleAdmin = false

// Check (optionally comma-separated) list of authorise.roles - if we get `true` then stop checking
grailsApplication.config.getProperty('authorise.roles', String).tokenize(',').each {
!userHasRoleAdmin ? userHasRoleAdmin = authService?.userInRole( it ) : null
}

if (userHasRoleAdmin) {
isCollectionAdmin = true
Expand Down

0 comments on commit 646c31f

Please sign in to comment.