OC-AUTH with admin persona
This commit is contained in:
@@ -66,7 +66,7 @@ func (o *PermissionController) GetByRole() {
|
||||
// @router /user/:id [get]
|
||||
func (o *PermissionController) GetByUser() {
|
||||
id := o.Ctx.Input.Param(":id")
|
||||
role, err := infrastructure.GetPermissionConnector().GetPermissionByUser(id)
|
||||
role, err := infrastructure.GetPermissionConnector().GetPermissionByUser(id, true)
|
||||
if err != nil {
|
||||
o.Data["json"] = map[string]interface{}{
|
||||
"data": nil,
|
||||
@@ -88,7 +88,7 @@ func (o *PermissionController) GetByUser() {
|
||||
// @Description find auth by permission
|
||||
// @Param id path string true "the permission you want to get"
|
||||
// @Success 200 {auth} models.auth
|
||||
// @router /:id/:relation[get]
|
||||
// @router /:id/:relation [get]
|
||||
func (o *PermissionController) Get() {
|
||||
id := o.Ctx.Input.Param(":id")
|
||||
rel := o.Ctx.Input.Param(":relation")
|
||||
|
||||
Reference in New Issue
Block a user