示例#1
0
 def get_acl():
     """
       Instanciate the access control object and return it.
       Read the current ACL configuration.
     """
     acl_conf = loadJSONFromFile('conf/permissions.json')
     return access_control.AccessControl(acl_conf)
示例#2
0
 def get_acl():
     """
       Instanciate the access control object and return it.
       Read the current ACL configuration.
     """
     acl_conf = loadJSONFromFile('conf/permissions.json')
     return access_control.AccessControl(acl_conf)
示例#3
0
 def get_form(self):
     try:
         if self.template_html is not None:
             self.template = loadJSONFromFile(self.template_html)
         else:
             self.template = CaliopeEntityUtil() \
                 .makeFormTemplate(self.entity_class)
         return self.template
     except:
         return list()
示例#4
0
 def get_form(self):
     try:
         if self.template_html is not None:
             self.template = loadJSONFromFile(self.template_html)
         else:
             self.template = CaliopeEntityUtil() \
                 .makeFormTemplate(self.entity_class)
         return self.template
     except:
         return list()
示例#5
0
 def get_layout(self):
     #: TODO: Implement depending on user
     try:
         if self.template_layout is not None:
             self.layout = loadJSONFromFile(self.template_layout)['layout']
         elif 'layout' in self.template: #for all in one template compatibility workaround
             self.layout = self.template['layout']
             self.template.pop('layout')
         else:
             self.layout = CaliopeEntityUtil() \
                 .makeLayoutTemplate(self.entity_class)
         return self.layout
     except:
         return list()
示例#6
0
 def get_layout(self):
     #: TODO: Implement depending on user
     try:
         if self.template_layout is not None:
             self.layout = loadJSONFromFile(self.template_layout)['layout']
         elif 'layout' in self.template:  #for all in one template compatibility workaround
             self.layout = self.template['layout']
             self.template.pop('layout')
         else:
             self.layout = CaliopeEntityUtil() \
                 .makeLayoutTemplate(self.entity_class)
         return self.layout
     except:
         return list()
def configure_server_and_app(server_config_file):
    config = loadJSONFromFile(server_config_file, '')
    print config['server']
    if 'static' in config['server']:
        static_path = config['server']['static']
    else:
        static_path = "."

    if 'minify_enabled' in config['server']:
        minify_enabled = config['server']['minify_enabled'].lower() == 'true'
    else:
        minify_enabled = False

    return [static_path, minify_enabled]
示例#8
0
def configure_server_and_app(server_config_file):
    config = loadJSONFromFile(server_config_file, '')
    print config['server']
    if 'static' in config['server']:
        static_path = config['server']['static']
    else:
        static_path = "."

    if 'minify_enabled' in config['server']:
        minify_enabled = config['server']['minify_enabled'].lower() == 'true'
    else:
        minify_enabled = False

    return [static_path, minify_enabled]
 def setUp(self):
     acl_conf = loadJSONFromFile('../../conf/permissions_for_test.json')
     self.acl = cid.core.access_control.access_control.AccessControl(
         acl_conf)
 def setUp(self):
     acl_conf = loadJSONFromFile('../../conf/permissions_for_test.json')
     self.acl = cid.core.access_control.access_control.AccessControl(acl_conf)