Skip to content

feat: add GetAllUsers() API to separate users from roles#1652

Merged
hsluoyz merged 4 commits intomasterfrom
copilot/separate-users-and-roles-again
Jan 6, 2026
Merged

feat: add GetAllUsers() API to separate users from roles#1652
hsluoyz merged 4 commits intomasterfrom
copilot/separate-users-and-roles-again

Conversation

Copy link
Contributor

Copilot AI commented Jan 3, 2026

Casbin currently returns both users and roles together via GetAllSubjects(), making it impossible to distinguish between them programmatically.

Changes

  • Added GetAllUsers(): Returns subjects that are not roles (subjects - roles)
  • Updated all enforcer types: Enforcer, SyncedEnforcer, and IEnforcer interface

Implementation

Users are computed as the set difference between all policy subjects and grouping policy roles (field index 1 in g policies):

func (e *Enforcer) GetAllUsers() ([]string, error) {
    subjects, err := e.GetAllSubjects()
    if err != nil {
        return nil, err
    }
    roles, err := e.GetAllRoles()
    if err != nil {
        return nil, err
    }
    return util.SetSubtract(subjects, roles), nil
}

Usage

e, _ := casbin.NewEnforcer("rbac_model.conf", "rbac_policy.csv")

// Policy: p, alice, data1, read
//         p, bob, data2, write  
//         p, data2_admin, data2, read
// Grouping: g, alice, data2_admin

e.GetAllSubjects()  // [alice, bob, data2_admin]
e.GetAllRoles()     // [data2_admin]
e.GetAllUsers()     // [alice, bob]
Original prompt

This section details on the original issue you should resolve

<issue_title>[feature] separate users and roles in Casbin</issue_title>
<issue_description>currently Casbin doesn't separate users and roles. Need to have a way to separate users and roles

so we can have GetUsers() and GetRoles() APIs</issue_description>

Comments on the Issue (you are @copilot in this section)


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@hsluoyz hsluoyz marked this pull request as ready for review January 3, 2026 16:28
Co-authored-by: hsluoyz <3787410+hsluoyz@users.noreply.github.com>
@github-actions
Copy link

github-actions bot commented Jan 3, 2026

Benchmark Comparison

Comparing base branch (c622095)
vs PR branch (32cb8c0)

goos: linux
goarch: amd64
pkg: github.com/casbin/casbin/v3
cpu: AMD EPYC 7763 64-Core Processor                
                                                 │ base-bench.txt │             pr-bench.txt             │
                                                 │     sec/op     │    sec/op     vs base                │
CachedRaw-4                                          17.67n ± ∞ ¹   17.64n ± ∞ ¹       ~ (p=1.000 n=1) ²
CachedBasicModel-4                                   174.7n ± ∞ ¹   170.5n ± ∞ ¹       ~ (p=1.000 n=1) ²
CachedRBACModel-4                                    176.0n ± ∞ ¹   172.8n ± ∞ ¹       ~ (p=1.000 n=1) ²
CachedRBACModelSmall-4                               182.9n ± ∞ ¹   179.4n ± ∞ ¹       ~ (p=1.000 n=1) ²
CachedRBACModelMedium-4                              182.0n ± ∞ ¹   185.4n ± ∞ ¹       ~ (p=1.000 n=1) ²
CachedRBACModelLarge-4                               159.1n ± ∞ ¹   158.2n ± ∞ ¹       ~ (p=1.000 n=1) ²
CachedRBACModelWithResourceRoles-4                   177.2n ± ∞ ¹   171.1n ± ∞ ¹       ~ (p=1.000 n=1) ²
CachedRBACModelWithDomains-4                         184.7n ± ∞ ¹   182.6n ± ∞ ¹       ~ (p=1.000 n=1) ²
CachedABACModel-4                                    2.809µ ± ∞ ¹   2.877µ ± ∞ ¹       ~ (p=1.000 n=1) ²
CachedKeyMatchModel-4                                194.6n ± ∞ ¹   190.6n ± ∞ ¹       ~ (p=1.000 n=1) ²
CachedRBACModelWithDeny-4                            174.6n ± ∞ ¹   170.8n ± ∞ ¹       ~ (p=1.000 n=1) ²
CachedPriorityModel-4                                175.5n ± ∞ ¹   171.5n ± ∞ ¹       ~ (p=1.000 n=1) ²
CachedWithEnforceContext-4                           298.2n ± ∞ ¹   293.0n ± ∞ ¹       ~ (p=1.000 n=1) ²
CachedRBACModelMediumParallel-4                      180.1n ± ∞ ¹   172.5n ± ∞ ¹       ~ (p=1.000 n=1) ²
HasPolicySmall-4                                     490.4n ± ∞ ¹   517.4n ± ∞ ¹       ~ (p=1.000 n=1) ²
HasPolicyMedium-4                                    564.6n ± ∞ ¹   514.4n ± ∞ ¹       ~ (p=1.000 n=1) ²
HasPolicyLarge-4                                     584.3n ± ∞ ¹   564.4n ± ∞ ¹       ~ (p=1.000 n=1) ²
AddPolicySmall-4                                     564.2n ± ∞ ¹   506.2n ± ∞ ¹       ~ (p=1.000 n=1) ²
AddPolicyMedium-4                                    611.7n ± ∞ ¹   650.5n ± ∞ ¹       ~ (p=1.000 n=1) ²
AddPolicyLarge-4                                     1.251µ ± ∞ ¹   1.279µ ± ∞ ¹       ~ (p=1.000 n=1) ²
RemovePolicySmall-4                                  553.4n ± ∞ ¹   500.9n ± ∞ ¹       ~ (p=1.000 n=1) ²
RemovePolicyMedium-4                                 592.4n ± ∞ ¹   547.0n ± ∞ ¹       ~ (p=1.000 n=1) ²
RemovePolicyLarge-4                                  635.0n ± ∞ ¹   613.9n ± ∞ ¹       ~ (p=1.000 n=1) ²
Raw-4                                                17.52n ± ∞ ¹   17.63n ± ∞ ¹       ~ (p=1.000 n=1) ²
BasicModel-4                                         3.677µ ± ∞ ¹   3.582µ ± ∞ ¹       ~ (p=1.000 n=1) ²
RBACModel-4                                          5.522µ ± ∞ ¹   5.355µ ± ∞ ¹       ~ (p=1.000 n=1) ²
RBACModelSizes/small-4                               51.27µ ± ∞ ¹   49.11µ ± ∞ ¹       ~ (p=1.000 n=1) ²
RBACModelSizes/medium-4                              493.1µ ± ∞ ¹   491.9µ ± ∞ ¹       ~ (p=1.000 n=1) ²
RBACModelSizes/large-4                               5.181m ± ∞ ¹   5.339m ± ∞ ¹       ~ (p=1.000 n=1) ²
RBACModelSmall-4                                     60.14µ ± ∞ ¹   57.70µ ± ∞ ¹       ~ (p=1.000 n=1) ²
RBACModelMedium-4                                    568.3µ ± ∞ ¹   562.1µ ± ∞ ¹       ~ (p=1.000 n=1) ²
RBACModelLarge-4                                     5.948m ± ∞ ¹   5.867m ± ∞ ¹       ~ (p=1.000 n=1) ²
RBACModelWithResourceRoles-4                         5.473µ ± ∞ ¹   5.305µ ± ∞ ¹       ~ (p=1.000 n=1) ²
RBACModelWithDomains-4                               5.292µ ± ∞ ¹   5.050µ ± ∞ ¹       ~ (p=1.000 n=1) ²
ABACModel-4                                          2.911µ ± ∞ ¹   2.814µ ± ∞ ¹       ~ (p=1.000 n=1) ²
ABACRuleModel-4                                      4.260m ± ∞ ¹   4.255m ± ∞ ¹       ~ (p=1.000 n=1) ²
KeyMatchModel-4                                      6.361µ ± ∞ ¹   6.100µ ± ∞ ¹       ~ (p=1.000 n=1) ²
RBACModelWithDeny-4                                  7.108µ ± ∞ ¹   6.819µ ± ∞ ¹       ~ (p=1.000 n=1) ²
PriorityModel-4                                      4.346µ ± ∞ ¹   4.136µ ± ∞ ¹       ~ (p=1.000 n=1) ²
RBACModelWithDomainPatternLarge-4                    13.64µ ± ∞ ¹   13.37µ ± ∞ ¹       ~ (p=1.000 n=1) ²
RoleManagerSmall-4                                   72.00µ ± ∞ ¹   68.74µ ± ∞ ¹       ~ (p=1.000 n=1) ²
RoleManagerMedium-4                                  731.4µ ± ∞ ¹   721.6µ ± ∞ ¹       ~ (p=1.000 n=1) ²
RoleManagerLarge-4                                   7.984m ± ∞ ¹   7.796m ± ∞ ¹       ~ (p=1.000 n=1) ²
BuildRoleLinksWithPatternLarge-4                     337.1m ± ∞ ¹   336.7m ± ∞ ¹       ~ (p=1.000 n=1) ²
BuildRoleLinksWithDomainPatternLarge-4               11.76m ± ∞ ¹   11.67m ± ∞ ¹       ~ (p=1.000 n=1) ²
BuildRoleLinksWithPatternAndDomainPatternLarge-4     344.1m ± ∞ ¹   343.5m ± ∞ ¹       ~ (p=1.000 n=1) ²
HasLinkWithPatternLarge-4                            1.126µ ± ∞ ¹   1.101µ ± ∞ ¹       ~ (p=1.000 n=1) ²
HasLinkWithDomainPatternLarge-4                      480.4n ± ∞ ¹   471.4n ± ∞ ¹       ~ (p=1.000 n=1) ²
HasLinkWithPatternAndDomainPatternLarge-4            1.141µ ± ∞ ¹   1.104µ ± ∞ ¹       ~ (p=1.000 n=1) ²
ConcurrentHasLinkWithMatching-4                      2.025µ ± ∞ ¹   1.972µ ± ∞ ¹       ~ (p=1.000 n=1) ²
geomean                                              5.472µ         5.352µ        -2.19%
¹ need >= 6 samples for confidence interval at level 0.95
² need >= 4 samples to detect a difference at alpha level 0.05

                                                 │ base-bench.txt │             pr-bench.txt              │
                                                 │      B/op      │     B/op       vs base                │
CachedRaw-4                                           0.000 ± ∞ ¹     0.000 ± ∞ ¹       ~ (p=1.000 n=1) ²
CachedBasicModel-4                                    104.0 ± ∞ ¹     104.0 ± ∞ ¹       ~ (p=1.000 n=1) ²
CachedRBACModel-4                                     104.0 ± ∞ ¹     104.0 ± ∞ ¹       ~ (p=1.000 n=1) ²
CachedRBACModelSmall-4                                104.0 ± ∞ ¹     104.0 ± ∞ ¹       ~ (p=1.000 n=1) ²
CachedRBACModelMedium-4                               104.0 ± ∞ ¹     104.0 ± ∞ ¹       ~ (p=1.000 n=1) ²
CachedRBACModelLarge-4                                96.00 ± ∞ ¹     96.00 ± ∞ ¹       ~ (p=1.000 n=1) ²
CachedRBACModelWithResourceRoles-4                    104.0 ± ∞ ¹     104.0 ± ∞ ¹       ~ (p=1.000 n=1) ²
CachedRBACModelWithDomains-4                          120.0 ± ∞ ¹     120.0 ± ∞ ¹       ~ (p=1.000 n=1) ²
CachedABACModel-4                                   1.505Ki ± ∞ ¹   1.505Ki ± ∞ ¹       ~ (p=1.000 n=1) ²
CachedKeyMatchModel-4                                 152.0 ± ∞ ¹     152.0 ± ∞ ¹       ~ (p=1.000 n=1) ²
CachedRBACModelWithDeny-4                             104.0 ± ∞ ¹     104.0 ± ∞ ¹       ~ (p=1.000 n=1) ²
CachedPriorityModel-4                                 104.0 ± ∞ ¹     104.0 ± ∞ ¹       ~ (p=1.000 n=1) ²
CachedWithEnforceContext-4                            240.0 ± ∞ ¹     240.0 ± ∞ ¹       ~ (p=1.000 n=1) ²
CachedRBACModelMediumParallel-4                       105.0 ± ∞ ¹     105.0 ± ∞ ¹       ~ (p=1.000 n=1) ²
HasPolicySmall-4                                      150.0 ± ∞ ¹     150.0 ± ∞ ¹       ~ (p=1.000 n=1) ²
HasPolicyMedium-4                                     157.0 ± ∞ ¹     157.0 ± ∞ ¹       ~ (p=1.000 n=1) ²
HasPolicyLarge-4                                      165.0 ± ∞ ¹     165.0 ± ∞ ¹       ~ (p=1.000 n=1) ²
AddPolicySmall-4                                      152.0 ± ∞ ¹     152.0 ± ∞ ¹       ~ (p=1.000 n=1) ²
AddPolicyMedium-4                                     168.0 ± ∞ ¹     168.0 ± ∞ ¹       ~ (p=1.000 n=1) ²
AddPolicyLarge-4                                      446.0 ± ∞ ¹     454.0 ± ∞ ¹       ~ (p=1.000 n=1) ³
RemovePolicySmall-4                                   166.0 ± ∞ ¹     166.0 ± ∞ ¹       ~ (p=1.000 n=1) ²
RemovePolicyMedium-4                                  174.0 ± ∞ ¹     174.0 ± ∞ ¹       ~ (p=1.000 n=1) ²
RemovePolicyLarge-4                                   181.0 ± ∞ ¹     181.0 ± ∞ ¹       ~ (p=1.000 n=1) ²
Raw-4                                                 0.000 ± ∞ ¹     0.000 ± ∞ ¹       ~ (p=1.000 n=1) ²
BasicModel-4                                        1.472Ki ± ∞ ¹   1.474Ki ± ∞ ¹       ~ (p=1.000 n=1) ³
RBACModel-4                                         2.013Ki ± ∞ ¹   2.018Ki ± ∞ ¹       ~ (p=1.000 n=1) ³
RBACModelSizes/small-4                              19.80Ki ± ∞ ¹   19.83Ki ± ∞ ¹       ~ (p=1.000 n=1) ³
RBACModelSizes/medium-4                             187.3Ki ± ∞ ¹   187.2Ki ± ∞ ¹       ~ (p=1.000 n=1) ³
RBACModelSizes/large-4                              1.811Mi ± ∞ ¹   1.812Mi ± ∞ ¹       ~ (p=1.000 n=1) ³
RBACModelSmall-4                                    19.86Ki ± ∞ ¹   19.84Ki ± ∞ ¹       ~ (p=1.000 n=1) ³
RBACModelMedium-4                                   190.1Ki ± ∞ ¹   189.8Ki ± ∞ ¹       ~ (p=1.000 n=1) ³
RBACModelLarge-4                                    1.843Mi ± ∞ ¹   1.843Mi ± ∞ ¹       ~ (p=1.000 n=1) ³
RBACModelWithResourceRoles-4                        2.676Ki ± ∞ ¹   2.672Ki ± ∞ ¹       ~ (p=1.000 n=1) ³
RBACModelWithDomains-4                              1.787Ki ± ∞ ¹   1.787Ki ± ∞ ¹       ~ (p=1.000 n=1) ²
ABACModel-4                                         1.503Ki ± ∞ ¹   1.503Ki ± ∞ ¹       ~ (p=1.000 n=1) ²
ABACRuleModel-4                                     1.264Mi ± ∞ ¹   1.266Mi ± ∞ ¹       ~ (p=1.000 n=1) ³
KeyMatchModel-4                                     2.999Ki ± ∞ ¹   3.000Ki ± ∞ ¹       ~ (p=1.000 n=1) ³
RBACModelWithDeny-4                                 2.425Ki ± ∞ ¹   2.426Ki ± ∞ ¹       ~ (p=1.000 n=1) ³
PriorityModel-4                                     1.726Ki ± ∞ ¹   1.724Ki ± ∞ ¹       ~ (p=1.000 n=1) ³
RBACModelWithDomainPatternLarge-4                   8.490Ki ± ∞ ¹   8.491Ki ± ∞ ¹       ~ (p=1.000 n=1) ³
RoleManagerSmall-4                                  11.67Ki ± ∞ ¹   11.67Ki ± ∞ ¹       ~ (p=1.000 n=1) ²
RoleManagerMedium-4                                 123.0Ki ± ∞ ¹   123.0Ki ± ∞ ¹       ~ (p=1.000 n=1) ³
RoleManagerLarge-4                                  1.287Mi ± ∞ ¹   1.287Mi ± ∞ ¹       ~ (p=1.000 n=1) ³
BuildRoleLinksWithPatternLarge-4                    86.03Mi ± ∞ ¹   86.05Mi ± ∞ ¹       ~ (p=1.000 n=1) ³
BuildRoleLinksWithDomainPatternLarge-4              4.489Mi ± ∞ ¹   4.489Mi ± ∞ ¹       ~ (p=1.000 n=1) ³
BuildRoleLinksWithPatternAndDomainPatternLarge-4    87.71Mi ± ∞ ¹   87.66Mi ± ∞ ¹       ~ (p=1.000 n=1) ³
HasLinkWithPatternLarge-4                             177.0 ± ∞ ¹     177.0 ± ∞ ¹       ~ (p=1.000 n=1) ²
HasLinkWithDomainPatternLarge-4                       80.00 ± ∞ ¹     80.00 ± ∞ ¹       ~ (p=1.000 n=1) ²
HasLinkWithPatternAndDomainPatternLarge-4             177.0 ± ∞ ¹     177.0 ± ∞ ¹       ~ (p=1.000 n=1) ²
ConcurrentHasLinkWithMatching-4                       622.0 ± ∞ ¹     622.0 ± ∞ ¹       ~ (p=1.000 n=1) ²
geomean                                                         ⁴                  +0.04%               ⁴
¹ need >= 6 samples for confidence interval at level 0.95
² all samples are equal
³ need >= 4 samples to detect a difference at alpha level 0.05
⁴ summaries must be >0 to compute geomean

                                                 │ base-bench.txt │             pr-bench.txt             │
                                                 │   allocs/op    │  allocs/op    vs base                │
CachedRaw-4                                           0.000 ± ∞ ¹    0.000 ± ∞ ¹       ~ (p=1.000 n=1) ²
CachedBasicModel-4                                    4.000 ± ∞ ¹    4.000 ± ∞ ¹       ~ (p=1.000 n=1) ²
CachedRBACModel-4                                     4.000 ± ∞ ¹    4.000 ± ∞ ¹       ~ (p=1.000 n=1) ²
CachedRBACModelSmall-4                                4.000 ± ∞ ¹    4.000 ± ∞ ¹       ~ (p=1.000 n=1) ²
CachedRBACModelMedium-4                               4.000 ± ∞ ¹    4.000 ± ∞ ¹       ~ (p=1.000 n=1) ²
CachedRBACModelLarge-4                                3.000 ± ∞ ¹    3.000 ± ∞ ¹       ~ (p=1.000 n=1) ²
CachedRBACModelWithResourceRoles-4                    4.000 ± ∞ ¹    4.000 ± ∞ ¹       ~ (p=1.000 n=1) ²
CachedRBACModelWithDomains-4                          4.000 ± ∞ ¹    4.000 ± ∞ ¹       ~ (p=1.000 n=1) ²
CachedABACModel-4                                     18.00 ± ∞ ¹    18.00 ± ∞ ¹       ~ (p=1.000 n=1) ²
CachedKeyMatchModel-4                                 4.000 ± ∞ ¹    4.000 ± ∞ ¹       ~ (p=1.000 n=1) ²
CachedRBACModelWithDeny-4                             4.000 ± ∞ ¹    4.000 ± ∞ ¹       ~ (p=1.000 n=1) ²
CachedPriorityModel-4                                 4.000 ± ∞ ¹    4.000 ± ∞ ¹       ~ (p=1.000 n=1) ²
CachedWithEnforceContext-4                            5.000 ± ∞ ¹    5.000 ± ∞ ¹       ~ (p=1.000 n=1) ²
CachedRBACModelMediumParallel-4                       4.000 ± ∞ ¹    4.000 ± ∞ ¹       ~ (p=1.000 n=1) ²
HasPolicySmall-4                                      6.000 ± ∞ ¹    6.000 ± ∞ ¹       ~ (p=1.000 n=1) ²
HasPolicyMedium-4                                     6.000 ± ∞ ¹    6.000 ± ∞ ¹       ~ (p=1.000 n=1) ²
HasPolicyLarge-4                                      7.000 ± ∞ ¹    7.000 ± ∞ ¹       ~ (p=1.000 n=1) ²
AddPolicySmall-4                                      6.000 ± ∞ ¹    6.000 ± ∞ ¹       ~ (p=1.000 n=1) ²
AddPolicyMedium-4                                     7.000 ± ∞ ¹    7.000 ± ∞ ¹       ~ (p=1.000 n=1) ²
AddPolicyLarge-4                                      9.000 ± ∞ ¹    9.000 ± ∞ ¹       ~ (p=1.000 n=1) ²
RemovePolicySmall-4                                   7.000 ± ∞ ¹    7.000 ± ∞ ¹       ~ (p=1.000 n=1) ²
RemovePolicyMedium-4                                  7.000 ± ∞ ¹    7.000 ± ∞ ¹       ~ (p=1.000 n=1) ²
RemovePolicyLarge-4                                   8.000 ± ∞ ¹    8.000 ± ∞ ¹       ~ (p=1.000 n=1) ²
Raw-4                                                 0.000 ± ∞ ¹    0.000 ± ∞ ¹       ~ (p=1.000 n=1) ²
BasicModel-4                                          17.00 ± ∞ ¹    17.00 ± ∞ ¹       ~ (p=1.000 n=1) ²
RBACModel-4                                           35.00 ± ∞ ¹    35.00 ± ∞ ¹       ~ (p=1.000 n=1) ²
RBACModelSizes/small-4                                480.0 ± ∞ ¹    480.0 ± ∞ ¹       ~ (p=1.000 n=1) ²
RBACModelSizes/medium-4                              4.829k ± ∞ ¹   4.828k ± ∞ ¹       ~ (p=1.000 n=1) ³
RBACModelSizes/large-4                               48.16k ± ∞ ¹   48.17k ± ∞ ¹       ~ (p=1.000 n=1) ³
RBACModelSmall-4                                      615.0 ± ∞ ¹    615.0 ± ∞ ¹       ~ (p=1.000 n=1) ²
RBACModelMedium-4                                    6.018k ± ∞ ¹   6.018k ± ∞ ¹       ~ (p=1.000 n=1) ²
RBACModelLarge-4                                     60.30k ± ∞ ¹   60.30k ± ∞ ¹       ~ (p=1.000 n=1) ²
RBACModelWithResourceRoles-4                          28.00 ± ∞ ¹    28.00 ± ∞ ¹       ~ (p=1.000 n=1) ²
RBACModelWithDomains-4                                25.00 ± ∞ ¹    25.00 ± ∞ ¹       ~ (p=1.000 n=1) ²
ABACModel-4                                           17.00 ± ∞ ¹    17.00 ± ∞ ¹       ~ (p=1.000 n=1) ²
ABACRuleModel-4                                      40.09k ± ∞ ¹   40.09k ± ∞ ¹       ~ (p=1.000 n=1) ²
KeyMatchModel-4                                       37.00 ± ∞ ¹    37.00 ± ∞ ¹       ~ (p=1.000 n=1) ²
RBACModelWithDeny-4                                   49.00 ± ∞ ¹    49.00 ± ∞ ¹       ~ (p=1.000 n=1) ²
PriorityModel-4                                       22.00 ± ∞ ¹    22.00 ± ∞ ¹       ~ (p=1.000 n=1) ²
RBACModelWithDomainPatternLarge-4                     72.00 ± ∞ ¹    72.00 ± ∞ ¹       ~ (p=1.000 n=1) ²
RoleManagerSmall-4                                    797.0 ± ∞ ¹    797.0 ± ∞ ¹       ~ (p=1.000 n=1) ²
RoleManagerMedium-4                                  8.741k ± ∞ ¹   8.741k ± ∞ ¹       ~ (p=1.000 n=1) ²
RoleManagerLarge-4                                   89.74k ± ∞ ¹   89.74k ± ∞ ¹       ~ (p=1.000 n=1) ²
BuildRoleLinksWithPatternLarge-4                     3.600M ± ∞ ¹   3.600M ± ∞ ¹       ~ (p=1.000 n=1) ³
BuildRoleLinksWithDomainPatternLarge-4               145.2k ± ∞ ¹   145.2k ± ∞ ¹       ~ (p=1.000 n=1) ³
BuildRoleLinksWithPatternAndDomainPatternLarge-4     3.679M ± ∞ ¹   3.679M ± ∞ ¹       ~ (p=1.000 n=1) ³
HasLinkWithPatternLarge-4                             13.00 ± ∞ ¹    13.00 ± ∞ ¹       ~ (p=1.000 n=1) ²
HasLinkWithDomainPatternLarge-4                       5.000 ± ∞ ¹    5.000 ± ∞ ¹       ~ (p=1.000 n=1) ²
HasLinkWithPatternAndDomainPatternLarge-4             13.00 ± ∞ ¹    13.00 ± ∞ ¹       ~ (p=1.000 n=1) ²
ConcurrentHasLinkWithMatching-4                       21.00 ± ∞ ¹    21.00 ± ∞ ¹       ~ (p=1.000 n=1) ²
geomean                                                         ⁴                 +0.00%               ⁴
¹ need >= 6 samples for confidence interval at level 0.95
² all samples are equal
³ need >= 4 samples to detect a difference at alpha level 0.05
⁴ summaries must be >0 to compute geomean

🤖 This comment will be automatically updated with the latest benchmark results.

Co-authored-by: hsluoyz <3787410+hsluoyz@users.noreply.github.com>
Copilot AI changed the title [WIP] Add separate users and roles functionality in Casbin Add GetUsers() and GetRoles() APIs to separate users from roles Jan 3, 2026
Copilot AI requested a review from hsluoyz January 3, 2026 16:38
@hsluoyz
Copy link
Member

hsluoyz commented Jan 6, 2026

@copilot remove TestGetUsersAndRoles

don't add GetUsers() and GetRoles() alias APIs

…test

Co-authored-by: hsluoyz <3787410+hsluoyz@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Jan 6, 2026

@copilot remove TestGetUsersAndRoles

don't add GetUsers() and GetRoles() alias APIs
...

Done. Removed TestGetUsersAndRoles, TestGetUsersWithNoRoles, and the GetUsers()/GetRoles() alias APIs. Only GetAllUsers() remains. Changes in commit 32cb8c0.

Copilot AI changed the title Add GetUsers() and GetRoles() APIs to separate users from roles Add GetAllUsers() API to separate users from roles Jan 6, 2026
@hsluoyz hsluoyz changed the title Add GetAllUsers() API to separate users from roles feat: add GetAllUsers() API to separate users from roles Jan 6, 2026
@hsluoyz hsluoyz merged commit 3fbde75 into master Jan 6, 2026
4 of 6 checks passed
@github-actions
Copy link

github-actions bot commented Jan 6, 2026

🎉 This PR is included in version 3.8.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[feature] separate users and roles in Casbin

3 participants