def user_show(context, data_dict): # By default, user details can be read by anyone, but some properties like # the API key are stripped at the action level if not not logged in. if not asbool(config.get('ckan.auth.public_user_details', True)): return restrict_anon(context) else: return {'success': True}
def user_show(context: Context, data_dict: DataDict) -> AuthResult: # By default, user details can be read by anyone, but some properties like # the API key are stripped at the action level if not not logged in. if not config.get_value('ckan.auth.public_user_details'): return restrict_anon(context) else: return {'success': True}
def user_show(context, data_dict): # By default, user details can be read by anyone, but some properties like # the API key are stripped at the action level if not not logged in. if not asbool(config.get('ckan.auth.public_user_details', True)): return restrict_anon(context) else: return {'success': True}
def user_list(context, data_dict): # Users list is visible by default if data_dict.get('email'): # only sysadmins can specify the 'email' parameter return {'success': False} if not asbool(config.get('ckan.auth.public_user_details', True)): return restrict_anon(context) else: return {'success': True}
def user_list(context: Context, data_dict: DataDict) -> AuthResult: # Users list is visible by default if data_dict.get('email'): # only sysadmins can specify the 'email' parameter return {'success': False} if not config.get_value('ckan.auth.public_user_details'): return restrict_anon(context) else: return {'success': True}
def user_list(context, data_dict): # Users list is visible by default if not asbool(config.get('ckan.auth.public_user_details', True)): return restrict_anon(context) else: return {'success': True}