mirror of
https://github.com/ansible/awx.git
synced 2026-02-28 08:18:43 -03:30
Add Access List to Orgs.
This commit is contained in:
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_CONFIG = `${API_V2}config/`;
|
||||||
const API_ORGANIZATIONS = `${API_V2}organizations/`;
|
const API_ORGANIZATIONS = `${API_V2}organizations/`;
|
||||||
const API_INSTANCE_GROUPS = `${API_V2}instance_groups/`;
|
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';
|
const LOGIN_CONTENT_TYPE = 'application/x-www-form-urlencoded';
|
||||||
|
|
||||||
@@ -64,6 +66,12 @@ class APIClient {
|
|||||||
return this.http.post(API_ORGANIZATIONS, data);
|
return this.http.post(API_ORGANIZATIONS, data);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
getOrganzationAccessList (id) {
|
||||||
|
const endpoint = `${API_ORGANIZATIONS}${id}/access_list/`;
|
||||||
|
|
||||||
|
return this.http.get(endpoint);
|
||||||
|
}
|
||||||
|
|
||||||
getOrganizationDetails (id) {
|
getOrganizationDetails (id) {
|
||||||
const endpoint = `${API_ORGANIZATIONS}${id}/`;
|
const endpoint = `${API_ORGANIZATIONS}${id}/`;
|
||||||
|
|
||||||
@@ -76,6 +84,24 @@ class APIClient {
|
|||||||
return this.http.get(endpoint, { params });
|
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 = {}) {
|
getOrganizationNotifications (id, params = {}) {
|
||||||
const endpoint = `${API_ORGANIZATIONS}${id}/notification_templates/`;
|
const endpoint = `${API_ORGANIZATIONS}${id}/notification_templates/`;
|
||||||
|
|
||||||
|
|||||||
@@ -14,6 +14,7 @@ import {
|
|||||||
PageSection
|
PageSection
|
||||||
} from '@patternfly/react-core';
|
} from '@patternfly/react-core';
|
||||||
|
|
||||||
|
import OrganizationAccess from './OrganizationAccess';
|
||||||
import OrganizationDetail from './OrganizationDetail';
|
import OrganizationDetail from './OrganizationDetail';
|
||||||
import OrganizationEdit from './OrganizationEdit';
|
import OrganizationEdit from './OrganizationEdit';
|
||||||
import OrganizationNotifications from './OrganizationNotifications';
|
import OrganizationNotifications from './OrganizationNotifications';
|
||||||
@@ -141,7 +142,14 @@ class Organization extends Component {
|
|||||||
)}
|
)}
|
||||||
<Route
|
<Route
|
||||||
path="/organizations/:id/access"
|
path="/organizations/:id/access"
|
||||||
render={() => <CardBody><h1><Trans>Access</Trans></h1></CardBody>}
|
render={() => (
|
||||||
|
<OrganizationAccess
|
||||||
|
api={api}
|
||||||
|
match={match}
|
||||||
|
location={location}
|
||||||
|
history={history}
|
||||||
|
/>
|
||||||
|
)}
|
||||||
/>
|
/>
|
||||||
<Route
|
<Route
|
||||||
path="/organizations/:id/teams"
|
path="/organizations/:id/teams"
|
||||||
|
|||||||
Reference in New Issue
Block a user