Git Product home page Git Product logo

Comments (1)

Vladysl avatar Vladysl commented on June 11, 2024

policy binded to role using public.role_to_policy table

user binded to owner using public.user_owner_mapping;

Role should be binded with policy using public.role_to_policy

User binded to role through owner using public.owner_to_role.
In case, user doesn't binded to role, ODD will try to use default role by authority ADMIN or USER
In case, ODD cannot specify default role and user doesn't binded to role, list of policies will be empty.

If you want to edit or create new PermissionResourceType
1.You need to update Administrator(and other policies if needed) and add your new resource
2.add new resource to PolicyTypeDto, AuthorizationManagerType, PolicyConditionKeyDto and PermissionResourceType
3.Create PermissionExtractor by extending AbstractContextualPermissionExtractor
4.Create {ResoruceName}PolicyResolverContext which will be used to validate policies and ownership(if needed).
5.add new method extract{ResourceName}Permissions to PolicyPermissionExtractor
6.Create ConditionResolver by extending AbstractConditionResolver

API's:

  1. api/identity/whoami - returns MANAGEMENT permissions for role.
  2. api/resource/{PermissionResourceType}/{resource_id}/permissions - returns specific polices by PermissionResourceType for role.
image

from odd-platform.

Related Issues (20)

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.