Class: Teamlab::Settings
- Inherits:
-
Object
- Object
- Teamlab::Settings
- Defined in:
- lib/teamlab/modules/settings.rb
Instance Method Summary collapse
- #get_admin_security(product_id, user_id) ⇒ Object
- #get_ip_restrictions ⇒ Object
- #get_ldap_settings ⇒ Object
- #get_logo ⇒ Object
- #get_product_admin(product_id) ⇒ Object
- #get_security(ids = []) ⇒ Object
- #get_settings ⇒ Object
- #get_sso_settings ⇒ Object
- #get_usage_quota ⇒ Object
- #get_version ⇒ Object
- #get_white_label_sizes ⇒ Object
-
#initialize ⇒ Settings
constructor
A new instance of Settings.
- #save_ip_restrictions(ips) ⇒ Object
- #set_access(id, enabled = true) ⇒ Object
- #set_product_admin(product_id, user_id, administrator = true) ⇒ Object
- #set_security(id, options = {}) ⇒ Object
- #set_version(version_id) ⇒ Object
- #sms_settings(enable) ⇒ Object
- #update_ip_restrictions(enable) ⇒ Object
- #update_tips(show) ⇒ Object
Constructor Details
Instance Method Details
#get_admin_security(product_id, user_id) ⇒ Object
43 44 45 |
# File 'lib/teamlab/modules/settings.rb', line 43 def get_admin_security(product_id, user_id) @request.get(%w(security administrator), productid: product_id, userid: user_id) end |
#get_ip_restrictions ⇒ Object
35 36 37 |
# File 'lib/teamlab/modules/settings.rb', line 35 def get_ip_restrictions @request.get(%w(iprestrictions)) end |
#get_ldap_settings ⇒ Object
15 16 17 |
# File 'lib/teamlab/modules/settings.rb', line 15 def get_ldap_settings @request.get(%w(LDAP)) end |
#get_logo ⇒ Object
19 20 21 |
# File 'lib/teamlab/modules/settings.rb', line 19 def get_logo @request.get(%w(logo)) end |
#get_product_admin(product_id) ⇒ Object
47 48 49 |
# File 'lib/teamlab/modules/settings.rb', line 47 def get_product_admin(product_id) @request.get(['security', 'administrator', product_id.to_s]) end |
#get_security(ids = []) ⇒ Object
31 32 33 |
# File 'lib/teamlab/modules/settings.rb', line 31 def get_security(ids = []) @request.get(%w(security), ids: ids) end |
#get_settings ⇒ Object
7 8 9 |
# File 'lib/teamlab/modules/settings.rb', line 7 def get_settings @request.get end |
#get_sso_settings ⇒ Object
11 12 13 |
# File 'lib/teamlab/modules/settings.rb', line 11 def get_sso_settings @request.get(%w(SSO)) end |
#get_usage_quota ⇒ Object
23 24 25 |
# File 'lib/teamlab/modules/settings.rb', line 23 def get_usage_quota @request.get(%w(quota)) end |
#get_version ⇒ Object
27 28 29 |
# File 'lib/teamlab/modules/settings.rb', line 27 def get_version @request.get(%w(version)) end |
#get_white_label_sizes ⇒ Object
39 40 41 |
# File 'lib/teamlab/modules/settings.rb', line 39 def get_white_label_sizes @request.get(%w(whitelabel sizes)) end |
#save_ip_restrictions(ips) ⇒ Object
67 68 69 |
# File 'lib/teamlab/modules/settings.rb', line 67 def save_ip_restrictions(ips) @request.put(%w(iprestrictions), ips: ips) end |
#set_access(id, enabled = true) ⇒ Object
71 72 73 |
# File 'lib/teamlab/modules/settings.rb', line 71 def set_access(id, enabled = true) @request.put(%w(security access), items: [{ key: id, value: enabled }]) end |
#set_product_admin(product_id, user_id, administrator = true) ⇒ Object
75 76 77 |
# File 'lib/teamlab/modules/settings.rb', line 75 def set_product_admin(product_id, user_id, administrator = true) @request.put(%w(security administrator), productid: product_id, userid: user_id, administrator: administrator) end |
#set_security(id, options = {}) ⇒ Object
63 64 65 |
# File 'lib/teamlab/modules/settings.rb', line 63 def set_security(id, = {}) @request.put(%w(security), { id: id }.merge()) end |
#set_version(version_id) ⇒ Object
59 60 61 |
# File 'lib/teamlab/modules/settings.rb', line 59 def set_version(version_id) @request.put(%w(version), versionId: version_id) end |
#sms_settings(enable) ⇒ Object
51 52 53 |
# File 'lib/teamlab/modules/settings.rb', line 51 def sms_settings(enable) @request.put(%w(sms), enable: enable) end |
#update_ip_restrictions(enable) ⇒ Object
79 80 81 |
# File 'lib/teamlab/modules/settings.rb', line 79 def update_ip_restrictions(enable) @request.put(%w(iprestrictions settings), enable: enable) end |
#update_tips(show) ⇒ Object
55 56 57 |
# File 'lib/teamlab/modules/settings.rb', line 55 def update_tips(show) @request.put(%w(tips), show: show) end |