package act.aaa;

import org.osgl.aaa.DynamicPermissionCheckHelper;
import org.osgl.aaa.Permission;
import org.osgl.util.C;

import java.util.List;

public abstract class DynamicPermissionCheckHelperBase<T> implements DynamicPermissionCheckHelper<T>{

    protected abstract Class<T> getTargetClass();

    @Override
    public List<? extends Permission> permissions() {
        return C.list();
    }
}

@@ -31,40 +31,9 @@
 sgl.
-aaa.DynamicPermissionCheckHelper
+$
 ;%0Aim
@@ -50,26 +50,17 @@
 sgl.aaa.
-Permission
+*
 ;%0Aimport
@@ -256,16 +256,54 @@
 ass();%0A%0A
+    /**%0A     *%0A     * @return%0A     */%0A
     @Ove
@@ -362,16 +362,678 @@
 ons() %7B%0A
+        List%3CString%3E names = permissionNames();%0A        if (names.isEmpty()) %7B%0A            return C.list();%0A        %7D%0A        AAAContext aaa = AAA.context();%0A        AAAPersistentService ps = aaa.getPersistentService();%0A        List%3CPermission%3E perms = C.newList();%0A        for (String name: names) %7B%0A            Permission p = ps.findByName(name, Permission.class);%0A            perms.add($.notNull(p));%0A        %7D%0A        return perms;%0A    %7D%0A%0A    /**%0A     * Returns a list of permission name strings. By default%0A     * this method will return an empty list.%0A     * @return permission names in a string list%0A     */%0A    protected List%3CString%3E permissionNames() %7B%0A
         

add permissionNames() method to DyanmicPermissionCheckHelperBase class