Class: Core::Models::Permissions::Route

Inherits:
Object
  • Object
show all
Includes:
Concerns::Activable, Concerns::Premiumable, Mongoid::Document, Mongoid::Timestamps
Defined in:
lib/core/models/permissions/route.rb

Overview

A route is an endpoint accessible in the API. Each route has to have an associated endpoint in the deployed instances.

Instance Attribute Summary collapse

Instance Attribute Details

#authenticatedBoolean

Returns if true, the session_id is needed for this route, if false it is not.

Returns:

  • (Boolean)

    if true, the session_id is needed for this route, if false it is not.



22
# File 'lib/core/models/permissions/route.rb', line 22

field :authenticated, type: Mongoid::Boolean, default: true

#groupsArray<Core::Models::Permissions::Group>

Returns the groups having permission to access this route.

Returns:



25
# File 'lib/core/models/permissions/route.rb', line 25

has_and_belongs_to_many :groups, class_name: 'Core::Models::Permissions::Group', inverse_of: :groups

#pathString

Returns the path (URI) of the route in the API.

Returns:

  • (String)

    the path (URI) of the route in the API.



16
# File 'lib/core/models/permissions/route.rb', line 16

field :path, type: String, default: '/'

#verbString

Returns the verb (HTTP method) of this route in the API.

Returns:

  • (String)

    the verb (HTTP method) of this route in the API.



19
# File 'lib/core/models/permissions/route.rb', line 19

field :verb, type: String, default: 'get'