Project

General

Profile

Actions

Feature #258

closed

Feature #280: 薬剤師の複数薬局所属設定を実装

APIファイルのリファクタリング、BaseControllerで共通化

Added by 關山 和丈 3 months ago. Updated about 2 months ago.

Status:
Closed
Priority:
Normal
Assignee:
Start date:
02/21/2026
Due date:
02/21/2026
% Done:

0%

Estimated time:
4:00 h
Spent time:

Description

render json: { error: "Unauthorized" }, status: :forbiddenに対して

# API関連
      def authorize_patient!(patient)
        return true if current_pharmacist.admin? || patient.pharmacy_id == current_pharmacist.pharmacy_id

        render json: { error: "Unauthorized" }, status: :forbidden
        false
      end

      def authorize_pharmacy_id!(pharmacy_id)
        return true if current_pharmacist.admin? || pharmacy_id == current_pharmacist.pharmacy_id

        render json: { error: "Unauthorized" }, status: :forbidden
        false
      end
Actions #1

Updated by 關山 和丈 3 months ago

  • Tracker changed from Bug to Feature
  • Description updated (diff)
Actions #2

Updated by 關山 和丈 3 months ago

  • Description updated (diff)
Actions #3

Updated by 關山 和丈 about 2 months ago

  • Parent task set to #280
Actions #4

Updated by 關山 和丈 about 2 months ago

  • Status changed from New to Closed
Actions

Also available in: Atom PDF