mirror of
https://github.com/dkmstr/openuds.git
synced 2025-03-20 06:50:23 +03:00
Correctly added Tokens table permissions type
This commit is contained in:
parent
de5031febf
commit
49ce5622d6
@ -1,7 +1,7 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
#
|
||||
# Copyright (c) 2014-2019 Virtual Cable S.L.
|
||||
# Copyright (c) 2014-2021 Virtual Cable S.L.U.
|
||||
# All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without modification,
|
||||
@ -12,7 +12,7 @@
|
||||
# * Redistributions in binary form must reproduce the above copyright notice,
|
||||
# this list of conditions and the following disclaimer in the documentation
|
||||
# and/or other materials provided with the distribution.
|
||||
# * Neither the name of Virtual Cable S.L. nor the names of its contributors
|
||||
# * Neither the name of Virtual Cable S.L.U. nor the names of its contributors
|
||||
# may be used to endorse or promote products derived from this software
|
||||
# without specific prior written permission.
|
||||
#
|
||||
@ -59,6 +59,8 @@ CALENDAR_RULE_TYPE = 14
|
||||
PROXY_TYPE = 16
|
||||
METAPOOL_TYPE = 15
|
||||
ACCOUNT_TYPE = 16
|
||||
ACTOR_TOKEN_TYPE = 17
|
||||
TUNNEL_TOKEN_TYPE = 18
|
||||
|
||||
objTypeDict: typing.Dict[typing.Type, int] = {
|
||||
models.Provider: PROVIDER_TYPE,
|
||||
@ -77,8 +79,11 @@ objTypeDict: typing.Dict[typing.Type, int] = {
|
||||
models.CalendarRule: CALENDAR_RULE_TYPE,
|
||||
models.Proxy: PROXY_TYPE,
|
||||
models.MetaPool: METAPOOL_TYPE,
|
||||
models.Account: ACCOUNT_TYPE
|
||||
models.Account: ACCOUNT_TYPE,
|
||||
models.ActorToken: ACTOR_TOKEN_TYPE,
|
||||
models.TunnelToken: TUNNEL_TOKEN_TYPE,
|
||||
}
|
||||
|
||||
|
||||
def getObjectType(obj: 'Model') -> typing.Optional[int]:
|
||||
return objTypeDict.get(type(obj))
|
||||
|
@ -1,7 +1,7 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
#
|
||||
# Copyright (c) 2014-2019 Virtual Cable S.L.
|
||||
# Copyright (c) 2014-2021 Virtual Cable S.L.U.
|
||||
# All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without modification,
|
||||
@ -12,7 +12,7 @@
|
||||
# * Redistributions in binary form must reproduce the above copyright notice,
|
||||
# this list of conditions and the following disclaimer in the documentation
|
||||
# and/or other materials provided with the distribution.
|
||||
# * Neither the name of Virtual Cable S.L. nor the names of its contributors
|
||||
# * Neither the name of Virtual Cable S.L.U. nor the names of its contributors
|
||||
# may be used to endorse or promote products derived from this software
|
||||
# without specific prior written permission.
|
||||
#
|
||||
@ -42,6 +42,7 @@ if typing.TYPE_CHECKING:
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
# Import names into namespace
|
||||
PERMISSION_ALL = models.Permissions.PERMISSION_ALL
|
||||
PERMISSION_READ = models.Permissions.PERMISSION_READ
|
||||
PERMISSION_MANAGEMENT = models.Permissions.PERMISSION_MANAGEMENT
|
||||
|
Loading…
x
Reference in New Issue
Block a user