Commit Graph
316 Commits
Author SHA1 Message Date
Akita Noek 91cd32d304 Fixed old test expectations 2016-08-16 15:36:07 -04:00
Akita Noek 9c5c09169e Made it so the credential organization field can't be changed
This makes it so the credential organizaiton field can't be changed
through the API (unless the user is a super user). This brings us into
alignment with the original intent.
2016-08-16 15:32:29 -04:00
AlanCoding 0271aa611c add field to JT for asking to skip tags 2016-08-01 16:49:34 -04:00
Akita Noek fc253e2d71 Merge pull request #3174 from anoek/3076
Allow users to post some ignored read only fields to job templates without elevated permissions
2016-08-01 15:45:02 -04:00
Alan Rominger 1352fe822d Merge pull request #3172 from AlanCoding/3118_role_read
Drop in visible_roles to RoleAccess can_read
2016-08-01 15:40:21 -04:00
Matthew Jones 3e1c0111f5 Merge branch 'api_release_3.0.1' into release_3.0.2
* api_release_3.0.1:
  add code to HostAccess can_add so the browsable API will work
  update unit tetsts
  use get_object_or_400 to fetch Role
  refactor to unit tests
  restrict User.admin_role membership changes through RoleUsersList
  fix test
  do not allow membership changes to User.admin_role
  RoleTeam and TeamRole sublist NotFound exception handling and test update
  add system job templates to the unified JT list
  Reorganize activity stream around org admin/auditors
  Allow instant cancel for new jobs
  orphan project protection in job delete access
  pass context into Job and JobList serializer classes
  pass context to unified job template subclasses
  Allow auditors to see same /api/v1/config information as admins
2016-08-01 13:23:37 -04:00
AlanCoding 5dbbaf4105 add code to HostAccess can_add so the browsable API will work 2016-07-29 12:02:40 -04:00
AlanCoding 945635eb70 also limit creation of system auditors to superusers
squash
2016-07-27 17:02:08 -04:00
Alan Rominger 0c8946702c Merge pull request #3139 from AlanCoding/3096_show_sys_JT
Show system JTs in the UJT list
2016-07-27 14:21:24 -04:00
AlanCoding 1d951a7eff use same model method to determine read permission as we do in the views 2016-07-27 12:13:38 -04:00
AlanCoding e27ce600c5 add system job templates to the unified JT list 2016-07-27 10:28:53 -04:00
Wayne Witzel III 74b013aad0 driveby cleanup 2016-07-26 12:09:58 -04:00
Wayne Witzel III 9bad20cee3 do not allow assignment of system roles or user.admin_role to teams 2016-07-26 12:09:36 -04:00
AlanCoding 6fee46fb66 Reorganize activity stream around org admin/auditors 2016-07-22 12:50:14 -04:00
Akita Noek 64d653bc61 Equate '' to None for foreign key references when PUTing to a job template
The UI will sometimes send an empty string instead of null, we already
handle this in our serializer and treat it as null, so this change
brings our access system in line with the expectation that those two
things should be equal.

 Possibly related to #3077
2016-07-22 10:11:33 -04:00
Akita Noek 2934cbbbae Allow users to post some ignored read only fields to job templates without elevated permissions
Previously, posting these fields would cause us to check and see if the
user has not only admin access to the job template but use access on
anything used by the job template (because the fields wern't white
listed as being ok to modify without comprehensive use access). It's
convenient for the QA team to be allowed include these fields in PUT's,
and since they're ignored, this patch is fairly benign and shouldn't
alter any behavior.

 #3076
2016-07-22 09:51:00 -04:00
Akita Noek 5bce9ee215 If you have use_role on an inventory, make it so you can use it in scan jobs
#3077
2016-07-21 17:22:11 -04:00
AlanCoding fc96952084 orphan project protection in job delete access 2016-07-20 10:21:38 -04:00
Matthew Jones b587b892b0 Switch base class for StateConflict
This fixes the output format for the 409 exception return
2016-07-18 12:29:51 -04:00
Matthew Jones c36080e149 Explicit super user check for JT can_delete 2016-07-15 13:48:42 -04:00
Matthew Jones eb97b8c916 Switch disallowed object delete to 409
In the case of running job conflicts
2016-07-15 11:47:02 -04:00
Matthew Jones c852503163 Fix up some flake8 issues 2016-07-14 12:40:37 -04:00
Matthew Jones 00e55e3813 Add delete protection from certain objects
Certain objects can be sensitive to being deleted while jobs are
running, this protects those objects
2016-07-14 12:22:33 -04:00
Akita Noek d39b9ff84f Merge pull request #3001 from anoek/misc-fixes
Minor migration fixes
2016-07-14 11:23:22 -04:00
Akita Noek 7b8c2f5b74 Normalized CustomInventoryScriptAccess.can_admin 2016-07-14 09:53:20 -04:00
AlanCoding 15f06ec9d3 allow system auditors to see orphan inventory scripts 2016-07-12 15:03:33 -04:00
AlanCoding 0fcc9abd69 allow org auditors to see notifications 2016-07-12 10:30:44 -04:00
AlanCoding f68495cf58 allow org auditors to view notification templates 2016-07-12 09:18:04 -04:00
Akita Noek fd461a9768 Remove redundant check 2016-07-11 15:05:35 -04:00
Akita Noek ec37703ce8 Allow SA's to read all notification templates 2016-07-11 14:44:36 -04:00
Akita Noek 134b60dbed Switch to explicit checks for system auditor for all applicable get_queryset calls
Solves #2918 and probably a couple other corner cases where orphan
situations could happen
2016-07-11 14:06:40 -04:00
Akita Noek 8bad695d26 Merge pull request #2886 from anoek/2804
Allow anyone who can read an inventory to see adhoc commands run on that inventory
2016-07-08 16:57:37 -04:00
AlanCoding 5027027aba update behavior of access.py to newer DRF, display POST box for most list endpoints 2016-07-08 15:18:40 -04:00
Akita Noek ee3d4dc42d Allow anyone who can read an inventory to see adhoc commands run on that inventory
This implicitly solves one of the issues with #2804, but is in general a
better behavior in general we believe.
2016-07-08 12:09:39 -04:00
AlanCoding 94c4db1d6a Show the project list POST text box for org admins in API browser 2016-07-07 14:05:09 -04:00
Akita Noek e41614f4e7 flake8 2016-07-07 10:24:04 -04:00
Akita Noek a42986894f Made it so org auditors can see all users if ORG_ADMINS_CAN_SEE_ALL_USERS is true
Addresses #2706
2016-07-07 09:22:36 -04:00
Akita Noek b6ec87f18a Merge pull request #2820 from anoek/2806
Allow anyone who can read an inventory to see adhoc command run against said inventory
2016-07-07 09:09:16 -04:00
Alan Rominger 9476bc12e9 Merge pull request #2787 from AlanCoding/2733_credential_org_access
Processing of "organization" related field in credential can_change
2016-07-06 15:43:17 -04:00
Alan Rominger 70b9a48f82 Merge pull request #2739 from AlanCoding/2735_proj_access
Do not allow creating projects as foreign org admin
2016-07-06 15:09:43 -04:00
Akita Noek 0e7ed8428d Allow anyone who can read an inventory to see adhoc command run against said inventory 2016-07-06 14:23:42 -04:00
AlanCoding ddbe54f841 allow null data cases in credential can_change 2016-07-05 15:06:40 -04:00
AlanCoding c21d560cfd Credential can_change updates for organization related field 2016-07-05 14:04:52 -04:00
AlanCoding c7bedcb004 Do not allow creating proejcts as foreign org admin 2016-07-01 09:51:26 -04:00
Akita Noek b21c7e1d15 Fix inventory update permission so update_role is enough to update 2016-06-30 14:58:44 -04:00
Alan Rominger 513e6c993f Merge pull request #2647 from AlanCoding/jt_can_add_betterment
A route around get_object_or_400 in JT can_add calcs
2016-06-28 14:31:44 -04:00
Chris Meyers 741ed4b904 allow members of an org to create labels for orgs that they are members of 2016-06-28 13:41:04 -04:00
AlanCoding 7b0f20e90d job template serializer can_add calc to avoid lookups of known related objects 2016-06-28 10:18:30 -04:00
Wayne Witzel III 5456b209ac Merge pull request #2654 from wwitzel3/issue-2485
reduce activity stream noise
2016-06-27 15:47:59 -04:00
Wayne Witzel III f0418d8841 Merge pull request #2634 from wwitzel3/issue-2560
Disallow non-admin of a user to add a user to Roles
2016-06-27 11:28:38 -04:00