Пример #1
0
def _init_hide_fields():
    '''Reads the names of the metadata fields which 
    will be not shown from the config hmbtg.ini file.
    '''
    global hide_extras_fields
    global hide_main_fields
    try:
        hide_extras_fields = getConfValue('hide.extras.fields').split()
    except Exception, e:
        hide_extras_fields = []    
Пример #2
0
def _init_hide_fields():
    '''Reads the names of the metadata fields which 
    will be not shown from the config hmbtg.ini file.
    '''
    global hide_extras_fields
    global hide_main_fields
    try:
        hide_extras_fields = getConfValue('hide.extras.fields').split()
    except Exception, e:
        hide_extras_fields = []
Пример #3
0
    }


def _init_hide_fields():
    '''Reads the names of the metadata fields which 
    will be not shown from the config hmbtg.ini file.
    '''
    global hide_extras_fields
    global hide_main_fields
    try:
        hide_extras_fields = getConfValue('hide.extras.fields').split()
    except Exception, e:
        hide_extras_fields = []    
    
    try:
        hide_main_fields = getConfValue('hide.main.fields').split()
    except Exception, e:
        hide_main_fields = []    
        
    

def check_logged_in(context):
    ''' Check if user is logged in.
    (Users must be logged-in to view all metadata fields.)
    '''
    model = context['model']
    try:
        user = context['user']
        userobj = model.User.get(user)
    except Exception, e:
Пример #4
0
    }


def _init_hide_fields():
    '''Reads the names of the metadata fields which 
    will be not shown from the config hmbtg.ini file.
    '''
    global hide_extras_fields
    global hide_main_fields
    try:
        hide_extras_fields = getConfValue('hide.extras.fields').split()
    except Exception, e:
        hide_extras_fields = []

    try:
        hide_main_fields = getConfValue('hide.main.fields').split()
    except Exception, e:
        hide_main_fields = []


def check_logged_in(context):
    ''' Check if user is logged in.
    (Users must be logged-in to view all metadata fields.)
    '''
    model = context['model']
    try:
        user = context['user']
        userobj = model.User.get(user)
    except Exception, e:

        # for internal commands like reindex use the whole api (including filtered fields)