mirror of
https://github.com/ansible/awx.git
synced 2026-01-13 19:10:07 -03:30
Add Access List to Orgs.
This commit is contained in:
parent
de3cc4637e
commit
3cd54c45eb
26
src/api.js
26
src/api.js
@ -5,6 +5,8 @@ const API_V2 = `${API_ROOT}v2/`;
|
||||
const API_CONFIG = `${API_V2}config/`;
|
||||
const API_ORGANIZATIONS = `${API_V2}organizations/`;
|
||||
const API_INSTANCE_GROUPS = `${API_V2}instance_groups/`;
|
||||
const API_USERS = `${API_V2}users/`;
|
||||
const API_TEAMS = `${API_V2}teams/`;
|
||||
|
||||
const LOGIN_CONTENT_TYPE = 'application/x-www-form-urlencoded';
|
||||
|
||||
@ -64,6 +66,12 @@ class APIClient {
|
||||
return this.http.post(API_ORGANIZATIONS, data);
|
||||
}
|
||||
|
||||
getOrganzationAccessList (id) {
|
||||
const endpoint = `${API_ORGANIZATIONS}${id}/access_list/`;
|
||||
|
||||
return this.http.get(endpoint);
|
||||
}
|
||||
|
||||
getOrganizationDetails (id) {
|
||||
const endpoint = `${API_ORGANIZATIONS}${id}/`;
|
||||
|
||||
@ -76,6 +84,24 @@ class APIClient {
|
||||
return this.http.get(endpoint, { params });
|
||||
}
|
||||
|
||||
getOrganizationUserRoles (id) {
|
||||
const endpoint = `${API_USERS}${id}/roles/`;
|
||||
|
||||
return this.http.get(endpoint);
|
||||
}
|
||||
|
||||
getUserTeams (id) {
|
||||
const endpoint = `${API_USERS}${id}/teams/`;
|
||||
|
||||
return this.http.get(endpoint);
|
||||
}
|
||||
|
||||
getTeamRoles (id) {
|
||||
const endpoint = `${API_TEAMS}${id}/roles/`;
|
||||
|
||||
return this.http.get(endpoint);
|
||||
}
|
||||
|
||||
getOrganizationNotifications (id, params = {}) {
|
||||
const endpoint = `${API_ORGANIZATIONS}${id}/notification_templates/`;
|
||||
|
||||
|
||||
@ -14,6 +14,7 @@ import {
|
||||
PageSection
|
||||
} from '@patternfly/react-core';
|
||||
|
||||
import OrganizationAccess from './OrganizationAccess';
|
||||
import OrganizationDetail from './OrganizationDetail';
|
||||
import OrganizationEdit from './OrganizationEdit';
|
||||
import OrganizationNotifications from './OrganizationNotifications';
|
||||
@ -141,7 +142,14 @@ class Organization extends Component {
|
||||
)}
|
||||
<Route
|
||||
path="/organizations/:id/access"
|
||||
render={() => <CardBody><h1><Trans>Access</Trans></h1></CardBody>}
|
||||
render={() => (
|
||||
<OrganizationAccess
|
||||
api={api}
|
||||
match={match}
|
||||
location={location}
|
||||
history={history}
|
||||
/>
|
||||
)}
|
||||
/>
|
||||
<Route
|
||||
path="/organizations/:id/teams"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user