Removed the URLer service
We don't have a need for it any more, so it can go.
This commit is contained in:
@@ -19,7 +19,6 @@ import flask
|
||||
from flask import g, render_template, request
|
||||
from flask_babel import Babel, gettext as _
|
||||
from flask.templating import TemplateNotFound
|
||||
import pymongo.collection
|
||||
import pymongo.database
|
||||
from werkzeug.local import LocalProxy
|
||||
|
||||
@@ -87,7 +86,7 @@ class PillarServer(BlinkerCompatibleEve):
|
||||
self._user_roles: typing.Set[str] = {
|
||||
'demo', 'admin', 'subscriber', 'homeproject',
|
||||
'protected', 'org-subscriber', 'video-encoder',
|
||||
'service', 'badger', 'svner', 'urler',
|
||||
'service', 'badger', 'svner',
|
||||
}
|
||||
self._user_roles_indexable: typing.Set[str] = {'demo', 'admin', 'subscriber'}
|
||||
|
||||
|
@@ -3,7 +3,6 @@
|
||||
import logging
|
||||
import typing
|
||||
|
||||
import bson
|
||||
import blinker
|
||||
import bson
|
||||
|
||||
@@ -11,8 +10,7 @@ from flask import Blueprint, current_app, request
|
||||
from werkzeug import exceptions as wz_exceptions
|
||||
|
||||
from pillar.api import local_auth
|
||||
from pillar.api.utils import mongo
|
||||
from pillar.api.utils import authorization, authentication, str2id, jsonify
|
||||
from pillar.api.utils import authorization, authentication
|
||||
|
||||
blueprint = Blueprint('service', __name__)
|
||||
log = logging.getLogger(__name__)
|
||||
@@ -159,19 +157,6 @@ def do_badger(action: str, *,
|
||||
return '', 204
|
||||
|
||||
|
||||
@blueprint.route('/urler/<project_id>', methods=['GET'])
|
||||
@authorization.require_login(require_roles={'service', 'urler'}, require_all=True)
|
||||
def urler(project_id):
|
||||
"""Returns the URL of any project."""
|
||||
|
||||
project_id = str2id(project_id)
|
||||
project = mongo.find_one_or_404('projects', project_id,
|
||||
projection={'url': 1})
|
||||
return jsonify({
|
||||
'_id': project_id,
|
||||
'url': project['url']})
|
||||
|
||||
|
||||
def manage_user_group_membership(db_user, role, action):
|
||||
"""Some roles have associated groups; this function maintains group & role membership.
|
||||
|
||||
|
@@ -65,13 +65,6 @@ def create_badger_account(email, badges):
|
||||
create_service_account(email, ['badger'], {'badger': badges.strip().split()})
|
||||
|
||||
|
||||
@manager_setup.command
|
||||
def create_urler_account(email):
|
||||
"""Creates a new service account that can fetch all project URLs."""
|
||||
|
||||
create_service_account(email, ['urler'], {})
|
||||
|
||||
|
||||
@manager_setup.command
|
||||
def create_local_user_account(email, password):
|
||||
from pillar.api.local_auth import create_local_user
|
||||
|
@@ -183,11 +183,6 @@ GIT = 'git'
|
||||
RENDER_HOME_AS_REGULAR_PROJECT = False
|
||||
|
||||
|
||||
# Authentication token for the Urler service. If None, defaults
|
||||
# to the authentication token of the current user.
|
||||
URLER_SERVICE_AUTH_TOKEN = None
|
||||
|
||||
|
||||
# Blender Cloud add-on version. This updates the value in all places in the
|
||||
# front-end.
|
||||
BLENDER_CLOUD_ADDON_VERSION = '1.4'
|
||||
|
@@ -5,6 +5,8 @@ BLENDER_ID_ENDPOINT = 'http://127.0.0.1:8001' # nonexistant server, no trailing
|
||||
SERVER_NAME = 'localhost'
|
||||
PILLAR_SERVER_ENDPOINT = 'http://localhost/api/'
|
||||
|
||||
MAIN_PROJECT_ID = '5672beecc0261b2005ed1a33'
|
||||
|
||||
DEBUG = False
|
||||
TESTING = True
|
||||
|
||||
|
Reference in New Issue
Block a user