Merge branch 'develop' of github.com:martini/zammad into develop
This commit is contained in:
commit
453280d199
6 changed files with 12 additions and 15 deletions
|
@ -271,11 +271,5 @@ Lint/Eval:
|
|||
Enabled: false
|
||||
Rails/HasAndBelongsToMany:
|
||||
Enabled: false
|
||||
Style/MethodName:
|
||||
Enabled: false
|
||||
Style/ModuleFunction:
|
||||
Enabled: false
|
||||
Style/AccessModifierIndentation:
|
||||
Enabled: false
|
||||
Lint/Loop:
|
||||
Enabled: false
|
||||
|
|
|
@ -7,7 +7,7 @@ class ObjectManagerAttributesController < ApplicationController
|
|||
def list
|
||||
return if deny_if_not_role(Z_ROLENAME_ADMIN)
|
||||
render json: {
|
||||
objects: ObjectManager.listFrontendObjects,
|
||||
objects: ObjectManager.list_frontend_objects,
|
||||
}
|
||||
#model_index_render(ObjectManager::Attribute, params)
|
||||
end
|
||||
|
|
|
@ -81,7 +81,7 @@ returns
|
|||
attributes
|
||||
end
|
||||
|
||||
private
|
||||
private
|
||||
|
||||
=begin
|
||||
|
||||
|
|
|
@ -6,11 +6,11 @@ class ObjectManager
|
|||
|
||||
list all backend managed object
|
||||
|
||||
ObjectManager.listObjects()
|
||||
ObjectManager.list_objects()
|
||||
|
||||
=end
|
||||
|
||||
def self.listObjects
|
||||
def self.list_objects
|
||||
['Ticket', 'TicketArticle', 'User', 'Organization', 'Group' ]
|
||||
end
|
||||
|
||||
|
@ -18,11 +18,11 @@ list all backend managed object
|
|||
|
||||
list all frontend managed object
|
||||
|
||||
ObjectManager.listFrontendObjects()
|
||||
ObjectManager.list_frontend_objects()
|
||||
|
||||
=end
|
||||
|
||||
def self.listFrontendObjects
|
||||
def self.list_frontend_objects
|
||||
['Ticket', 'User', 'Organization' ] #, 'Group' ]
|
||||
end
|
||||
|
||||
|
|
|
@ -28,8 +28,11 @@ class Token < ActiveRecord::Base
|
|||
private
|
||||
|
||||
def generate_token
|
||||
begin
|
||||
|
||||
loop do
|
||||
self.name = SecureRandom.hex(20)
|
||||
end while Token.exists?( name: self.name )
|
||||
|
||||
break if !Token.exists?( name: self.name )
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -18,7 +18,7 @@ module SessionHelper
|
|||
|
||||
def self.models(user = nil)
|
||||
models = {}
|
||||
objects = ObjectManager.listObjects
|
||||
objects = ObjectManager.list_objects
|
||||
objects.each {|object|
|
||||
attributes = ObjectManager::Attribute.by_object(object, user)
|
||||
models[object] = attributes
|
||||
|
|
Loading…
Reference in a new issue