This repository has been archived on 2023-03-27. You can view files and clone it, but cannot push or open issues or pull requests.
2018-11-29 20:37:02 -05:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2018-12-12 21:21:12 -05:00
|
|
|
class Staff::PassportPolicy < ApplicationPolicy
|
2018-11-29 21:29:39 -05:00
|
|
|
def show?
|
|
|
|
true
|
|
|
|
end
|
|
|
|
|
2018-11-29 23:07:45 -05:00
|
|
|
def create?
|
|
|
|
true
|
|
|
|
end
|
|
|
|
|
2018-11-29 22:51:30 -05:00
|
|
|
def permitted_attributes_for_create
|
2018-12-02 09:41:48 -05:00
|
|
|
[
|
2018-12-02 11:57:31 -05:00
|
|
|
:images,
|
2018-12-02 15:29:39 -05:00
|
|
|
passport_maps_attributes: %i[
|
2018-12-02 09:41:48 -05:00
|
|
|
surname given_name patronymic sex date_of_birth place_of_birth series
|
|
|
|
number issued_by unit_code date_of_issue
|
|
|
|
],
|
2018-11-29 22:51:30 -05:00
|
|
|
]
|
|
|
|
end
|
|
|
|
|
2018-11-29 20:37:02 -05:00
|
|
|
class Scope < Scope
|
|
|
|
def resolve
|
|
|
|
scope.all
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|