grails-platform-core

Grails springSecurityService.currentUser returns null

↘锁芯ラ 提交于 2019-12-11 11:58:35
问题 I have this service class: class UserService { def springSecurityService @Listener(topic = 'currentUser', namespace = 'auth') public User getCurrentUser(){ return springSecurityService.currentUser } def authenticate(OAuthToken oAuthToken){ SecurityContextHolder.context.authentication = oAuthToken return springSecurityService.currentUser } } If I use the authenticate method, springSecurityService.currentUser returns the current user. But if I am already logged in I want to get a current user

grails 2.2.2 platform-core-plugin No signature of method event in domain model

家住魔仙堡 提交于 2019-12-11 10:19:16
问题 I try out the platform-core-1.0 rc5 Plugin to services by events. Now I write a service in the grails-plugin "listadmin": package listadmin class SECO_ListenService { @grails.events.Listener(topic='getEntriesOfList', namespace='listadmin') def getEntriesOfList(String intnalListName) { println "SECO_ListenService" def Liste aList = Liste.findByInternal_name(intnalListName) return aList.eintrage.toList() } } This service should return a list for dropdown in an other grails-plugin called