from flask.ext.login import current_user


def create(app=None):
    if current_user.is_authenticated():
        if current_user.admin is True:
            return True
        else:
            return False
    else:
        return False


def read(app=None):
    return True


def update(app):
    return create(app)


def delete(app):
    return create(app)

from flask.ext.login import current_user


def create(category=None):
    if current_user.is_authenticated():
        if current_user.admin is True:
            return True
        else:
            return False
    else:
        return False


def read(category=None):
    return True


def update(category):
    return create(category)


def delete(category):
    return create(category)

Fix a typo in the variable name
Fix a typo in the variable name

  from flask.ext.login import current_user
  
  
- def create(app=None):
+ def create(category=None):
      if current_user.is_authenticated():
          if current_user.admin is True:
              return True
          else:
              return False
      else:
          return False
  
  
- def read(app=None):
+ def read(category=None):
      return True
  
  
- def update(app):
+ def update(category):
-     return create(app)
+     return create(category)
  
  
- def delete(app):
+ def delete(category):
-     return create(app)
+     return create(category)
  
Fix a typo in the variable name
## Code Before:
from flask.ext.login import current_user


def create(app=None):
    if current_user.is_authenticated():
        if current_user.admin is True:
            return True
        else:
            return False
    else:
        return False


def read(app=None):
    return True


def update(app):
    return create(app)


def delete(app):
    return create(app)

## Instruction:
Fix a typo in the variable name
## Code After:
from flask.ext.login import current_user


def create(category=None):
    if current_user.is_authenticated():
        if current_user.admin is True:
            return True
        else:
            return False
    else:
        return False


def read(category=None):
    return True


def update(category):
    return create(category)


def delete(category):
    return create(category)
