delete Permission{} if possible, it's invalid (we don't deal with "Scope", we have Rules{},
update API spec.json to use "[]rules.Rules" as well (keep TeamID as separate parameter)
So, the main point here is to have a unique data structure to read/save our permissions structure. A permission is defined for a [TeamID] over [ResourceID, Operation string, Access], so API calls for saving should use TeamID+[]Rules, while reading may only return "[]Rules".
change parameter order for Grant, ListGrants (teamID should be first param)
Simple ordering fix, we're granting Teams permissions on Resource,...
extend API to retrieve Resources available
we return default scopes for organisation (from list, defined here)
we need an API call which will return available resources from scope name (list orgs, teams, channels), e.g. /permissions/scopes/{scope} - new API
So, the intent here is to have a Messaging navigation in the Administration panel where you would have 3 sub-menus for each scope - Org, Team, Channel; In the Team views and Organisation views the administrator must select a Team or Channel for which he wants to view / change permissions.
cosmetic: drop types from API names ("getTeam" => "get", see other spec.json examples for "name"...)
All of these are non-blocking and needed for the admin panel interface. Here's the trello link with more info and screenshots.
There's an outline of a permissions api already specified. It needs to be extended in the following ways:
internal/rules/operations.go
So, the main point here is to have a unique data structure to read/save our permissions structure. A permission is defined for a [TeamID] over [ResourceID, Operation string, Access], so API calls for saving should use TeamID+[]Rules, while reading may only return "[]Rules".
internal/rules/interfaces.go
Simple ordering fix, we're granting Teams permissions on Resource,...
/permissions/scopes/{scope}
- new APISo, the intent here is to have a Messaging navigation in the Administration panel where you would have 3 sub-menus for each scope - Org, Team, Channel; In the Team views and Organisation views the administrator must select a Team or Channel for which he wants to view / change permissions.
All of these are non-blocking and needed for the admin panel interface. Here's the trello link with more info and screenshots.