'Return true if the user has permissions to add item to the given folder.'

def can_add_item(self, trans, folder):

    if trans.user_is_admin:
        return True
    current_user_roles = trans.get_current_user_roles()
    add_roles = set(trans.app.security_agent.get_roles_for_action(folder, trans.app.security_agent.permitted_actions.LIBRARY_ADD))
    for role in current_user_roles:
        if (role in add_roles):
            return True
    return False
