Skip to content

Commit

Permalink
[1263_platform] WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
zipofar committed Dec 29, 2023
1 parent 17e9578 commit 6986621
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# frozen_string_literal: true

module UffizziCore::Api::Cli::V1::AccountsControllerModule
def update; end
end
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
# @resource Project

class UffizziCore::Api::Cli::V1::AccountsController < UffizziCore::Api::Cli::V1::ApplicationController
include UffizziCore::Api::Cli::V1::AccountsControllerModule

before_action :authorize_uffizzi_core_api_cli_v1_accounts

# Get accounts of current user
Expand Down
4 changes: 4 additions & 0 deletions core/app/policies/uffizzi_core/api/cli/v1/accounts_policy.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,8 @@ def index?
def show?
context.user_access_module.any_access_to_account?(context.user, context.account)
end

def update?
false
end
end
2 changes: 1 addition & 1 deletion core/config/routes.rb
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
resource :session, only: ['create']
end

resources :accounts, only: ['show'], param: :name
resources :accounts, only: ['show', 'update'], param: :name

resources :accounts, only: ['index'] do
scope module: :accounts do
Expand Down

0 comments on commit 6986621

Please sign in to comment.