docbrown/app/policies
Duke Greene dd7e34ac53
define api v1 routes for organizations (#19681)
* define api routes and create controllers, sketch out index and create actions

* add api v1 organizations CRUD spec and docs spec, need to run swagger

* swagger dry run on admin organizations routes, typo fix in api.rb

* flesh out specs and sketch out admin actions

* move actions out of concerns/include pattern and into v1 inline

* remove private constant call

* add v1 accept header to doc spec, fix syntax in a before block

* update controllers to address failing specs

* simplify controller and clarify route config

* flesh out tests for errors

* fix long line

* add missing commas

* return username show route to v0 concern controller

* create separate show route and action name, remove nesting from create/update params requirement

* clean up syntax in controller params and update show path in specs; move routes

* fix up syntax in params permit

* create organization in index spec

* one more syntax tweak for org params

* refactoring to one show route that handles username or id

* tweak spec syntax to expect the right array

* tweak controller and specs, simplify routing to show

* remove create route, action, and specs from this branch

* add clarifying comment in show controller action

* add explicit not found return to show route

* fix controller formatting causing 404 errors

* remove comment, update specs

* remove commment and fix id show response and specs

* fix show route and request spec for username param

* update unauthorized user specs to use put for now instead of post, regenerate swagger docs

* adjust update 422 spec to break org validity

* fix admin update spec, rerun swagger

* reorganiza controller actions, update specs, ensure authorized update and delete

* improve spec, handle finding one org more gracefully, delete via worker

* copy routes into api namespace instead of moving them from general namespace

* update param in v0 show route to fit more general naming

* regenerate v1 swagger docs

* use profile image url getter in update controller response

* update swagger docs and remove unneeded comment from org' model

* configure organizations destroy action for super admins only (for now)
2023-07-19 09:51:05 -04:00
..
admin_policy.rb Renaming policy methods for consistency (#16523) 2022-02-11 09:10:54 -05:00
api_secret_policy.rb Rename unidiomatic methods (#13328) 2021-04-09 10:59:56 -05:00
application_policy.rb Try renaming moderator -> super_moderator (#18261) 2022-08-10 16:43:30 +02:00
article_policy.rb Routine rubocop fixes (#19254) 2023-03-24 14:37:44 +03:00
authorizer.rb Clear trusted cache in rolify callback (#19275) 2023-04-03 14:45:00 +02:00
comment_policy.rb Subscribe to Comment Functionality (#19555) 2023-07-10 17:11:46 +02:00
consumer_app_policy.rb Favoring method aliasing over explicit delegation (#16526) 2022-02-10 11:09:17 -05:00
discussion_lock_policy.rb Renaming policy methods for consistency (#16523) 2022-02-11 09:10:54 -05:00
follow_policy.rb Adjusting suspended user authorizations (#16634) 2022-02-21 10:08:24 -05:00
github_repo_policy.rb Favoring method aliasing over explicit delegation (#16526) 2022-02-10 11:09:17 -05:00
html_variant_policy.rb Renaming policy methods for consistency (#16523) 2022-02-11 09:10:54 -05:00
image_upload_policy.rb Rename banned and comment_banned roles (#12270) 2021-04-06 10:12:14 -05:00
internal_policy.rb Refactoring questions asked of user (#15762) 2021-12-21 12:45:12 -05:00
liquid_tag_policy.rb small non-views ruby i18n (#16004) 2022-01-11 10:05:18 +07:00
listing_policy.rb Favoring method aliasing over explicit delegation (#16526) 2022-02-10 11:09:17 -05:00
message_policy.rb Favoring method aliasing over explicit delegation (#16526) 2022-02-10 11:09:17 -05:00
organization_policy.rb define api v1 routes for organizations (#19681) 2023-07-19 09:51:05 -04:00
pinned_article_policy.rb Favoring method aliasing over explicit delegation (#16526) 2022-02-10 11:09:17 -05:00
rating_vote_policy.rb Rename banned and comment_banned roles (#12270) 2021-04-06 10:12:14 -05:00
reaction_policy.rb Refactor reaction categories as abstract class collection (#18540) 2022-11-01 10:50:37 +01:00
registration_policy.rb Refactor RegistrationsController (#13903) 2021-06-08 17:03:41 -04:00
response_template_policy.rb Change requirement for response_template (#18601) 2022-11-02 12:16:17 -04:00
role_policy.rb allows super_admin user to remove super_admin role (#19590) 2023-06-21 11:22:25 -04:00
space_policy.rb Penciling in a Default Spaces section (#16897) 2022-03-21 09:56:12 -04:00
stripe_active_card_policy.rb Favoring method aliasing over explicit delegation (#16526) 2022-02-10 11:09:17 -05:00
stripe_subscription_policy.rb Favoring method aliasing over explicit delegation (#16526) 2022-02-10 11:09:17 -05:00
tag_policy.rb Renaming policy methods for consistency (#16523) 2022-02-11 09:10:54 -05:00
user_block_policy.rb Favoring method aliasing over explicit delegation (#16526) 2022-02-10 11:09:17 -05:00
user_policy.rb Try renaming moderator -> super_moderator (#18261) 2022-08-10 16:43:30 +02:00
video_policy.rb Ensuring the VideoPolicy adhears to article creation (#16762) 2022-03-07 15:27:18 -05:00