DeletePermissionsForUserCtx deletes permissions for a user or role with context support. Returns false if the user or role does not have any permissions (aka not affected).
(ctx context.Context, user string)
| 123 | // DeletePermissionsForUserCtx deletes permissions for a user or role with context support. |
| 124 | // Returns false if the user or role does not have any permissions (aka not affected). |
| 125 | func (e *ContextEnforcer) DeletePermissionsForUserCtx(ctx context.Context, user string) (bool, error) { |
| 126 | subIndex, err := e.GetFieldIndex("p", constant.SubjectIndex) |
| 127 | if err != nil { |
| 128 | return false, err |
| 129 | } |
| 130 | return e.RemoveFilteredPolicyCtx(ctx, subIndex, user) |
| 131 | } |
nothing calls this directly
no test coverage detected