Example #1
0
def application_user_delete(oauth_request, application_id, user_id, extension):

  UserApplications_ = UserApplications(application_id, user_id)
  UserApplications_.current_user = oauth_request.user

  user_permissions = UserApplications_.permission_delete(application_id, user_id)

  if type(user_permissions) is tuple:
    return user_permissions

  arguments = {
    'the_content': user_permissions,
    'extension': extension
  }

  return status_.status_204(), 204
Example #2
0
def application_user_update(oauth_request, application_id, user_id, extension):

  UserApplications_ = UserApplications(application_id, user_id)
  UserApplications_.current_user = oauth_request.user

  user_permissions = UserApplications_.permission_update(application_id, user_id, request)

  if type(user_permissions) is tuple:
    return user_permissions

  arguments = {
    'the_content': user_permissions,
    'extension': extension
  }

  return UserApplications_.endpoint_response(**arguments)