Skip to content

Commit

Permalink
Update permission.go
Browse files Browse the repository at this point in the history
missing method getPermissionBySubmitter
  • Loading branch information
artinu777 authored Jul 16, 2024
1 parent 0b220df commit b4ee6fa
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions casdoorsdk/permission.go
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,22 @@ func (c *Client) GetPermissionsByRole(name string) ([]*Permission, error) {
return permissions, nil
}

func (c *Client) GetPermissionsBySubmitter() ([]*Permission, error) {
url := c.GetUrl("get-permissions-by-submitter")

Check failure on line 91 in casdoorsdk/permission.go

View workflow job for this annotation

GitHub Actions / test

not enough arguments in call to c.GetUrl

bytes, err := c.DoGetBytes(url)
if err != nil {
return nil, err
}

var permissions []*Permission
err = json.Unmarshal(bytes, &permissions)
if err != nil {
return nil, err
}
return permissions, nil
}

func (c *Client) GetPaginationPermissions(p int, pageSize int, queryMap map[string]string) ([]*Permission, int, error) {
queryMap["owner"] = c.OrganizationName
queryMap["p"] = strconv.Itoa(p)
Expand Down

0 comments on commit b4ee6fa

Please sign in to comment.