Ecommerce
Permission (ACL)

Role Permission List

Get all roles & access list, this route for specific role permission define by GET Method with filter function dropdown user option for you. below list of route with parameter

http://ecom.coderorbit.com/public/api/admin/{{app_token}}/roleAccess
 
headers:{ 
    "Accept": "application/json"    
    "Authorization" : `Bearer ${token}`
}

### Result

{
    "roles": [
        {
            "id": 2,
            "name": "Admin",
            "status": 2,
            "created_at": null,
            "updated_at": null
        },
        {
            .......
        }
    ],
    "access": [
        {
            "id": 3,
            "name": "Brand",
            "slug": "brand",
            "parent_id": null,
            "sequance": 3,
            "status": 1,
            "created_at": "2023-02-19T06:55:51.000000Z",
            "updated_at": "2023-02-19T06:55:51.000000Z",
            "action_menu": [
                {
                    "id": 6,
                    "menu_id": 3,
                    "action_id": 1
                },
                {
                    "id": 7,
                    "menu_id": 3,
                    "action_id": 2
                },
                {
                    "id": 8,
                    "menu_id": 3,
                    "action_id": 3
                },
                {
                    "id": 9,
                    "menu_id": 3,
                    "action_id": 4
                }
            ]
        }
    ]
}

=== Query Parameters ===

role_id = 1

Here is example url:

============================================================================================
GET = https://ecom.coderorbit.com/public/api/admin/{{app_token}}/roleAccess
============================================================================================
GET = https://ecom.coderorbit.com/public/api/admin/{{app_token}}/roleAccess{{userId}}

Individual Role Permission Update

This route for specific role permission define by POST Method with filter function dropdown user option for you. below list of route with parameter

http://ecom.coderorbit.com/public/api/admin/{{app_token}}/userAccess/{{userId}}
 
headers:{ 
    "Accept": "application/json"    
    "Authorization" : `Bearer ${token}`
}
 
body:{
  "exits": true, // this effect on exitings users, false | new user effect
  "roles": {
    "1":{ // Individual Menu Id
         "1":1, // Menu Action Id
         "2":2, // Menu Action Id
         "3":3, // Menu Action Id
         "4":4 // Menu Action Id
    },
    {
        .....
    }
  }
}
 

User Permission List

Get all users & access list, this route for specific user permission define by GET Method with filter function dropdown user option for you. below list of route with parameter

http://ecom.coderorbit.com/public/api/admin/{{app_token}}/userAccess
 
headers:{ 
    "Accept": "application/json"    
    "Authorization" : `Bearer ${token}`
}

### Result

{
    "users": [
        {
            "id": 1,
            "name": "test user",
            "email": ""
        },
        {
           ....
        }
    ],
    "access": [
        {
            "id": 3,
            "name": "Brand",
            "slug": "brand",
            "parent_id": null,
            "sequance": 3,
            "status": 1,
            "created_at": "2023-02-19T06:55:51.000000Z",
            "updated_at": "2023-02-19T06:55:51.000000Z",
            "action_menu": [
                {
                    "id": 6,
                    "menu_id": 3,
                    "action_id": 1
                },
                {
                    "id": 7,
                    "menu_id": 3,
                    "action_id": 2
                },
                {
                    "id": 8,
                    "menu_id": 3,
                    "action_id": 3
                },
                {
                    "id": 9,
                    "menu_id": 3,
                    "action_id": 4
                }
            ]
        },
        {
            ....
        }
    ]
}

=== Query Parameters ===

user_id = 1

Here is example url:

============================================================================================
GET = https://ecom.coderorbit.com/public/api/admin/{{app_token}}/userAccess
============================================================================================
GET = https://ecom.coderorbit.com/public/api/admin/{{app_token}}/userAccess{{userId}}

Individual User Permission Update

This route for specific user permission define by POST Method with filter function dropdown user option for you. below list of route with parameter

http://ecom.coderorbit.com/public/api/admin/{{app_token}}/userAccess/{{userId}}
 
headers:{ 
    "Accept": "application/json"    
    "Authorization" : `Bearer ${token}`
}
 
body:{
 
    "roles":
    {
       "1":{ // Individual Menu Id
         "1":1, // Menu Action Id
         "2":2, // Menu Action Id
         "3":3, // Menu Action Id
         "4":4 // Menu Action Id
       },
       "2":{
         "1":1,
         "2":2,
         "3":3,
         "4":4
       },
       ...
 
    }
}
 

loging user check permission

This route for specific login user permission check by GET Method below list of route

http://ecom.coderorbit.com/public/api/admin/{{app_token}}/currentAccess
 
headers:{ 
    "Accept": "application/json"    
    "Authorization" : `Bearer ${token}`
}
 
# Result
--------------------------------------------------------------
#Supere Admin
--------------------------------------------------------------
{
    "accessMenu": {
        "super_admin": "all_access"
    },
    "allAccess": {
        "super_admin": "all_access"
    }
}
 
--------------------------------------------------------------
#Others User
--------------------------------------------------------------
 
{
  "accessMenu": {
    "1": 1,
    "2": 1,
    "3": 1,
    "4": 1,
    "5": 1
  },
  "allAccess": {
    "1": {
      "1": 1,
      "2": 2,
      "3": 3,
      "4": 4
    },
    "2": {
      "1": 1,
      "2": 2,
      "3": 3,
      "4": 4
    },
    ....
  }
}
 
CODER ORBIT
Bangladesh Office:
Call: 01534-645492
11/C, House-01, Lane-10
Road-11, Dhaka 1216
Email: support@coderorbit.com
Others
Domain & Hosting
Course
Debug
Portfolio
FOLLOW US
SUBSCRIBE US
Subscribe
2018 - 2024 Copyright © Coder Orbit. All rights reserved.