Commit Graph

32 Commits

Author SHA1 Message Date
Alan Rominger
97605c5f19 Make custom urls work with RBAC 2024-04-11 14:59:09 -04:00
Alan Rominger
817c3b36b9 Replace role system with permissions-based DB roles
Develop ability to list permissions for existing roles

Create a model registry for RBAC-tracked models

Write the data migration logic for creating
  the preloaded role definitions

Write migration to migrate old Role into ObjectRole model

This loops over the old Role model, knowing it is unique
  on object and role_field

Most of the logic is concerned with identifying the
  needed permissions, and then corresponding role definition

As needed, object roles are created and users then teams
  are assigned

Write re-computation of cache logic for teams
  and then for object role permissions

Migrate new RBAC internals to ansible_base

Migrate tests to ansible_base

Implement solution for visible_roles

Expose URLs for DAB RBAC
2024-04-11 14:59:09 -04:00
Chris Meyers
0645d342dd Implement optional url prefix the Django way
* Before, the optional url prefix feature required calling our
  versioning version of reverse(). This worked _ok_ until we added more
  and more urls from 3rd party apps. Those 3rd party apps do not call
  our reverse(), writefully so.
* This implementation looks at the incoming request path. If it includes
  the special optional prefix url, then we register ALL the urls WITH
  the optional url prefix.
  If the incoming request path does NOT contain the options url prefix
  then we register ALL the urls WITHOUT the optional url prefix.
* Before this, we were registering BOTH sets of urls and then reverse()
  + the request as context to decide which url.
2024-04-10 16:03:09 -04:00
Hao Liu
ab593bda45 Add setting for configuring optional URL prefix for /api (#14939)
* Add setting for configuring optional URL prefix for /api

Add OPTIONAL_API_URLPATTERN_PREFIX setting

examples:
- if set to `''` (empty string) API pattern will be `/api`
- if set to 'controller' API pattern will be `/api` AND `/api/controller`
2024-03-19 15:56:33 +00:00
jessicamack
887604317e Integrate resources API in Controller (#14896)
* add resources api to controller

* update setting

models are not the source of truth in AWX

* Force creation of ServiceID object in tests

* fix typo

* settings fix for CI

---------

Co-authored-by: Alan Rominger <arominge@redhat.com>
2024-03-01 11:18:35 -05:00
Hao Liu
f53aa2d26b Build and serve UI_NEXT
- Add new makefile for building ui_next
- Add setting to toggle ui_next
- Add URL path for displaying ui_next
- Update collectstatic and template dir config to serve ui_next
2023-03-16 23:34:30 -04:00
Jeff Bradberry
1e625ed58b Fix up deprecation warning about re_path() replacing urls() 2022-03-07 18:11:36 -05:00
nixocio
f85b2b6352 Merge ui and ui_next in one dir
Merge ui and ui_next in one dir

See: https://github.com/ansible/awx/issues/10676

Update django .po files

Update django .po files

Run `awx-manage makemessages`.
2021-08-02 10:40:24 -04:00
Ryan Petrello
c2ef0a6500 move code linting to a stricter pep8-esque auto-formatting tool, black 2021-03-23 09:39:58 -04:00
Jake McDermott
27219d34eb Remove vestigal django stuff for old ui 2020-11-23 13:22:34 -05:00
Jake McDermott
12a22d2442 Add basic django app and file serving for ui_next 2020-06-25 08:55:56 -04:00
Graham Mainwaring
2b111c81df Add /login convenience URL 2019-12-11 17:21:02 -05:00
Jeff Bradberry
fa15696ffe Remove some dead comments 2019-09-30 13:26:03 -04:00
Ryan Petrello
eacf819caf add a reasonable default Content Security Policy
ideally we'd improve this over time to remove the `unsafe-inline` lines,
but we can't due that today because Angular1 makes use of a lot of
inline <script> and <style> tag generation

see: https://github.com/ansible/awx/issues/2056
2019-06-26 10:46:26 -04:00
AlanCoding
06be3a29b9 fix Django debug toolbar after its upgrade 2019-05-20 12:17:57 -04:00
Ryan Petrello
6f5259d017 remove the network UI 2018-07-30 11:03:53 -04:00
Ben Thomasson
96b3ebd31e Moves network_ui_test to an external repo 2018-03-23 17:00:27 -04:00
Ben Thomasson
b29a605800 Cleans up feature set for 3.3
This removes the experimental features that were not selected
for 3.3 release.

* Removes dpath requirement
* Removes generated action_plugins
* Removes network UI v1 api
* Removes unused network management commands
* Removes network UI CLI client
* Removes templates
* Removes unused DataBinding models
* Removes obsolete test
* Removes unused admin and tests
* Removes experimental UndoPersistence, RedoPersistence, and auto-layout functions
* Removes API endpoints for network visualization
* Removes unused consumer routes
* Removes group, site, and rack features for 3.3
* Removes unused tables controller
* Removes undo/redo
* Removes group code and scale checks
2018-03-23 17:00:24 -04:00
Ben Thomasson
640e687f3e Adds JSON and YAML export of the network topology.
Adds views that export the entire network topology as JSON and YAML.
2018-03-23 17:00:15 -04:00
Wayne Witzel III
f118e27047 Flake8 fixes and URL updates 2017-11-10 17:04:33 -05:00
Wayne Witzel III
6d6bbbb627 Update URL strucuture, fixed string based calls 2017-11-09 17:24:04 -05:00
Chris Church
b08a2d1d88 Update default error pages. 2016-02-02 23:00:07 -05:00
Chris Church
2ba5e06e2c Add support for single-sign on using python-social-auth (with Google/Github OAuth2 and SAML support). Add support for RADIUS as another authentication backend. 2015-10-02 14:57:27 -04:00
John Mitchell
32d1c0e4db fixed copyright date 2015-06-11 16:10:23 -04:00
Matthew Jones
b3da3b34a3 Changing some legal headers for python source files 2015-05-29 12:10:39 -04:00
Matthew Jones
888ae53027 Fix up flake8 runtime configuration, do a bit of flake8 work as it
relates to pyflakes)
2015-02-05 10:40:47 -05:00
Chris Church
352197c5d2 Removed admin support (no longer used or maintained). 2014-03-28 22:04:26 -04:00
Chris Church
2b7af0a2ec Happy new year!!! 2014-01-02 11:51:43 -05:00
Chris Church
52c0a93293 Fix error views to use base REST framework template instead of admin, since admin is disabled. 2013-11-19 23:37:19 -05:00
Chris Church
a25a162229 AC-170 Disable REST session auth and Django admin by default. 2013-11-19 14:45:42 -05:00
Chris Church
98883e771f Moved API code into separate Django app. 2013-11-04 15:44:49 -05:00
Chris Church
07657926b9 Rename ansibleworks to awx. 2013-06-23 13:21:02 -04:00