2012-05-18 13:53:20 +00:00
|
|
|
module ExtraCollection
|
2012-10-23 20:25:42 +00:00
|
|
|
def session( collections, user )
|
2012-05-18 13:53:20 +00:00
|
|
|
|
2012-10-01 18:41:08 +00:00
|
|
|
# all ticket stuff
|
2012-05-18 13:53:20 +00:00
|
|
|
collections['TicketStateType'] = Ticket::StateType.all
|
|
|
|
collections['TicketState'] = Ticket::State.all
|
|
|
|
collections['TicketPriority'] = Ticket::Priority.all
|
|
|
|
collections['TicketArticleType'] = Ticket::Article::Type.all
|
|
|
|
collections['TicketArticleSender'] = Ticket::Article::Sender.all
|
|
|
|
|
2012-11-12 09:34:22 +00:00
|
|
|
if !user.is_role('Customer')
|
|
|
|
|
|
|
|
# all signatures
|
|
|
|
collections['Signature'] = Signature.all
|
|
|
|
|
|
|
|
# all email addresses
|
|
|
|
collections['EmailAddress'] = EmailAddress.all
|
|
|
|
end
|
2012-05-18 13:53:20 +00:00
|
|
|
end
|
2012-10-23 20:25:42 +00:00
|
|
|
def push( collections, user )
|
2012-10-23 19:12:00 +00:00
|
|
|
|
|
|
|
# all ticket stuff
|
|
|
|
collections['TicketStateType'] = Ticket::StateType.all
|
|
|
|
collections['TicketState'] = Ticket::State.all
|
|
|
|
collections['TicketPriority'] = Ticket::Priority.all
|
|
|
|
collections['TicketArticleType'] = Ticket::Article::Type.all
|
|
|
|
collections['TicketArticleSender'] = Ticket::Article::Sender.all
|
|
|
|
|
2012-11-12 09:34:22 +00:00
|
|
|
if !user.is_role('Customer')
|
|
|
|
|
|
|
|
# all signatures
|
|
|
|
collections['Signature'] = Signature.all
|
|
|
|
|
|
|
|
# all email addresses
|
|
|
|
collections['EmailAddress'] = EmailAddress.all
|
|
|
|
|
|
|
|
# all templates
|
|
|
|
collections['Template'] = Template.all
|
|
|
|
|
|
|
|
# all text modules
|
|
|
|
collections['TextModule'] = TextModule.all
|
|
|
|
end
|
2012-10-23 19:12:00 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
module_function :session, :push
|
2012-05-18 13:53:20 +00:00
|
|
|
end
|