def check_has_write_access_permission(view_func):
 def decorate(request, *args, **kwargs):
  if (not has_write_access(request.user)):
   raise PopupException(_('You are not allowed to modify the metastore.'), detail=_('You have must have metastore:write permissions'), error_code=301)
  return view_func(request, *args, **kwargs)
 return wraps(view_func)(decorate)

def check_has_write_access_permission ( view_func ) : def decorate ( request , * args , ** kwargs ) : if ( not has_write_access ( request . user ) ) : raise PopupException ( _ ( 'You are not allowed to modify the metastore.' ) , detail = _ ( 'You have must have metastore:write permissions' ) , error_code = 301 ) return view_func ( request , * args , ** kwargs ) return wraps ( view_func ) ( decorate )
decorator ensuring that the user is not a read only user .