All Downloads are FREE. Search and download functionalities are using the official Maven repository.

yakworks.security.shiro.GormShiroPermissionResolver.groovy Maven / Gradle / Ivy

There is a newer version: 7.3.27
Show newest version
/*
* Copyright 2013-2015 Yak.Works - Licensed under the Apache License, Version 2.0 (the "License")
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
*/
package yakworks.security.shiro

import grails.compiler.GrailsCompileStatic
import yakworks.security.gorm.model.SecUserPermission

/**
 * @author Burt Beckwith
 */
@GrailsCompileStatic
class GormShiroPermissionResolver implements ShiroPermissionResolver {

    Set resolvePermissions(String username) {

        SecUserPermission.query {
            eq "user.username", username
        }.projections { property 'permission' }.list() as Set
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy