Coder Social home page Coder Social logo

java-aaa's People

Contributors

greenlaw110 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

java-aaa's Issues

Rework on AAA APIs

At the moment AAA APIs are a bit confusing and does not support all possible permutation of passing parameters

Allow specify privilege as any integer value

Currently it require a privilege be specific defined with name and level (an integer value).

This change request is to allow specify privilege with any integer value without being predefined.

Remove `Principal.getAllPermissions()` method

Literally all implementation will use the following logic:

    @Override
    public C.List<Permission> getAllPermissions() {
        final C.Set<Permission> set = C.newSet(getPermissions());
        getRoles().accept(new $.Visitor<Role>() {
            @Override
            public void visit(Role role) throws $.Break {
                set.addAll(role.getPermissions());
            }
        });
        return C.list(set.flatMap(EXPAND_PERMISSION));
    }

NPE when calling `AAA.requirePrivilege(int)` API

Error stack:

java.lang.NullPointerException: null
	at org.osgl.aaa.AAA.requirePrivilege(AAA.java:1338)
	at org.osgl.aaa.AAA.requirePrivilege(AAA.java:1210)
	at org.osgl.aaa.AAA.requirePrivilege(AAA.java:1150)
	at com.yabonza.endpoint.AdminConsole.ensureLoggedInAndPrivilege(AdminConsole.java:73)
	at com.yabonza.endpoint.AdminConsoleMethodAccess.invoke(Unknown Source)
	at act.handler.builtin.controller.impl.ReflectedHandlerInvoker.invoke(ReflectedHandlerInvoker.java:572)
	at act.handler.builtin.controller.impl.ReflectedHandlerInvoker.handle(ReflectedHandlerInvoker.java:267)
	at act.handler.builtin.controller.impl.ReflectedHandlerInvoker$_Before.handle(ReflectedHandlerInvoker.java:708)
	at act.handler.builtin.controller.RequestHandlerProxy$GroupInterceptorWithResult.apply(RequestHandlerProxy.java:587)
	at act.handler.builtin.controller.RequestHandlerProxy.handleBefore(RequestHandlerProxy.java:459)
	at act.handler.builtin.controller.RequestHandlerProxy.handle(RequestHandlerProxy.java:182)
	at act.handler.DelegateRequestHandler.handle(DelegateRequestHandler.java:47)
	at act.route.Router$ContextualHandler.handle(Router.java:1282)
	at act.xio.NetworkHandler$1.run(NetworkHandler.java:136)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
	at java.lang.Thread.run(Thread.java:745)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.