forked from shaba/openuds
fixed table name for user service properties
This commit is contained in:
parent
de0447bbc3
commit
1cbb7d1ae3
@ -54,7 +54,9 @@ install-udsactor:
|
||||
|
||||
cp $(SOURCEDIR)/UDSActorConfig.py $(LIBDIR)
|
||||
cp $(SOURCEDIR)/UDSActorUser.py $(LIBDIR)
|
||||
cp $(SOURCEDIR)/setup_dialog_ui.py $(LIBDIR)
|
||||
# QT Dialogs & resources
|
||||
cp $(SOURCEDIR)/*_ui.py $(LIBDIR)
|
||||
cp $(SOURCEDIR)/UDSActor_rc.py $(LIBDIR)
|
||||
|
||||
# Menu GUI app
|
||||
cp desktop/UDS_Actor_Configuration.desktop $(APPSDIR)
|
||||
|
@ -18,7 +18,7 @@ Package: udsactor-xrdp
|
||||
Section: x11
|
||||
Priority: optional
|
||||
Architecture: all
|
||||
Depends: xrdp (>= 0.6.0), udsactor (>= ${binary:Version}), libpam-modules-bin (>=1.0), ${misc:Depends}
|
||||
Depends: xrdp (>= 0.5.0), udsactor (>= ${binary:Version}), libpam-modules-bin (>=1.0), ${misc:Depends}
|
||||
Description: UDS Actor component for xrdp
|
||||
This package provides connection between uds actor and xrdp
|
||||
|
||||
|
@ -10,11 +10,13 @@ case "$1" in
|
||||
purge)
|
||||
;;
|
||||
remove)
|
||||
TMPFILE=$(mktemp /tmp/node.cfg.XXXXX)
|
||||
trap "rm -f $TMPFILE" 0
|
||||
cat $NXNODECFG | sed -e "s/.*udsnxst.*//" > $TMPFILE
|
||||
cp $TMPFILE $NXNODECFG
|
||||
invoke-rc.d nxserver restart
|
||||
if [ -f $NXNODECFG ]; then
|
||||
TMPFILE=$(mktemp /tmp/node.cfg.XXXXX)
|
||||
trap "rm -f $TMPFILE" 0
|
||||
cat $NXNODECFG | sed -e "s/.*udsnxst.*//" > $TMPFILE
|
||||
cp $TMPFILE $NXNODECFG
|
||||
invoke-rc.d nxserver restart
|
||||
fi
|
||||
;;
|
||||
upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
|
||||
;;
|
||||
|
@ -10,11 +10,13 @@ case "$1" in
|
||||
purge)
|
||||
;;
|
||||
remove)
|
||||
TMPFILE=$(mktemp /tmp/sesman.XXXXX)
|
||||
trap "rm -f $TMPFILE" 0
|
||||
grep -v uds $SESMANFILE > $TMPFILE # Removes all UDS lines from sesman if they exists
|
||||
cp $TMPFILE $SESMANFILE
|
||||
trap "rm -f $TMPFILE" 0
|
||||
if [ -f $SESMANFILE ]; then
|
||||
TMPFILE=$(mktemp /tmp/sesman.XXXXX)
|
||||
trap "rm -f $TMPFILE" 0
|
||||
grep -v uds $SESMANFILE > $TMPFILE # Removes all UDS lines from sesman if they exists
|
||||
cp $TMPFILE $SESMANFILE
|
||||
trap "rm -f $TMPFILE" 0
|
||||
fi
|
||||
;;
|
||||
upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
|
||||
;;
|
||||
|
@ -125,7 +125,7 @@ class Api(object):
|
||||
self.secretKey = six.text_type(uuid.uuid4())
|
||||
self.newerRequestLib = requests.__version__.split('.') >= '1'
|
||||
# Disable logging requests messages except for errors, ...
|
||||
logging.getLogger("requests").setLevel(logging.ERROR)
|
||||
logging.getLogger("requests").setLevel(logging.CRITICAL)
|
||||
|
||||
def _getUrl(self, method, key=None, ids=None):
|
||||
url = self.url + method
|
||||
|
@ -20,6 +20,7 @@ class Migration(migrations.Migration):
|
||||
('user_service', models.ForeignKey(related_name='properties', to='uds.UserService')),
|
||||
],
|
||||
options={
|
||||
'db_table': 'uds__user_service_property',
|
||||
},
|
||||
bases=(models.Model,),
|
||||
),
|
||||
|
@ -50,10 +50,20 @@ logger = logging.getLogger(__name__)
|
||||
|
||||
@python_2_unicode_compatible
|
||||
class UserServiceProperty(models.Model):
|
||||
'''
|
||||
Properties for User Service.
|
||||
The value field is a Text field, so we can put whatever we want in it
|
||||
'''
|
||||
name = models.CharField(max_length=128, db_index=True, unique=True)
|
||||
value = models.TextField(default='')
|
||||
|
||||
user_service = models.ForeignKey(UserService, on_delete=models.CASCADE, related_name='properties')
|
||||
|
||||
class Meta:
|
||||
'''
|
||||
Meta class to declare default order and unique multiple field index
|
||||
'''
|
||||
db_table = 'uds__user_service_property'
|
||||
app_label = 'uds'
|
||||
|
||||
def __str__(self):
|
||||
return "Property of {}. {}={}".format(self.user_service.pk, self.name, self.value)
|
||||
|
Loading…
Reference in New Issue
Block a user