mirror of
https://github.com/lucaspalomodevelop/indico-plugins.git
synced 2026-03-19 02:04:37 +00:00
VC/Vidyo: Use User.get_system_user()
This commit is contained in:
parent
d0c6370f2e
commit
2306fe601a
@ -24,7 +24,6 @@ from indico.core.auth import multipass
|
||||
from indico.core.db import db
|
||||
from indico.modules.auth import Identity
|
||||
from indico.modules.users import User
|
||||
from indico.core.config import Config
|
||||
|
||||
|
||||
authenticators_re = re.compile(r'\s*,\s*')
|
||||
@ -82,11 +81,7 @@ def update_room_from_obj(settings, vc_room, room_obj):
|
||||
"""Updates a VCRoom DB object using a SOAP room object returned by the API"""
|
||||
vc_room.name = room_obj.name
|
||||
if room_obj.ownerName != vc_room.data['owner_identity']:
|
||||
owner = get_user_from_identifier(settings, room_obj.ownerName)
|
||||
# if the owner does not exist anymore (e.g. was changed on the server),
|
||||
# use the janitor user as a placeholder
|
||||
if not owner:
|
||||
owner = User.get(Config.getInstance().getJanitorUserId())
|
||||
owner = get_user_from_identifier(settings, room_obj.ownerName) or User.get_system_user()
|
||||
vc_room.vidyo_extension.owned_by_user = owner
|
||||
|
||||
vc_room.data.update({
|
||||
|
||||
@ -21,7 +21,7 @@ from setuptools import setup, find_packages
|
||||
|
||||
setup(
|
||||
name='indico_vc_vidyo',
|
||||
version='0.5',
|
||||
version='0.5.1',
|
||||
url='https://github.com/indico/indico-plugins',
|
||||
license='https://www.gnu.org/licenses/gpl-3.0.txt',
|
||||
author='Indico Team',
|
||||
@ -30,7 +30,7 @@ setup(
|
||||
zip_safe=False,
|
||||
include_package_data=True,
|
||||
install_requires=[
|
||||
'indico>=1.9.10',
|
||||
'indico>=1.9.11.dev0',
|
||||
'zeep'
|
||||
],
|
||||
classifiers=[
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user