admin: saml2_use_role and saml2_role_prefix are deprecated

This commit is contained in:
Benjamin Dauvergne 2013-11-05 12:11:37 +01:00
parent 38f397e54b
commit c865b36734
3 changed files with 61 additions and 7 deletions

View File

@ -18,7 +18,7 @@ class WcsInstanceAdmin(admin.ModelAdmin):
fieldsets = (
(None, {'fields': ('title', 'domain'),}),
('site-options.cfg',
{'fields': ('postgresql', ('saml2_use_role', 'saml2_role_prefix',), 'backoffice_feed_url' )}
{'fields': ('postgresql', 'backoffice_feed_url' )}
),
('site-options.cfg au-quotidien',
{'fields': ('drupal', 'ezldap', 'strongbox', 'clicrdv', 'domino' )}

View File

@ -0,0 +1,60 @@
# -*- coding: utf-8 -*-
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Deleting field 'WcsInstance.saml2_use_role'
db.delete_column(u'wcsinst_wcsinstance', 'saml2_use_role')
# Deleting field 'WcsInstance.saml2_role_prefix'
db.delete_column(u'wcsinst_wcsinstance', 'saml2_role_prefix')
def backwards(self, orm):
# Adding field 'WcsInstance.saml2_use_role'
db.add_column(u'wcsinst_wcsinstance', 'saml2_use_role',
self.gf('django.db.models.fields.BooleanField')(default=False),
keep_default=False)
# Adding field 'WcsInstance.saml2_role_prefix'
db.add_column(u'wcsinst_wcsinstance', 'saml2_role_prefix',
self.gf('django.db.models.fields.CharField')(default='', max_length=128, blank=True),
keep_default=False)
models = {
u'wcsinst.apisecret': {
'Meta': {'object_name': 'ApiSecret'},
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'key': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
'value': ('django.db.models.fields.CharField', [], {'max_length': '1024', 'blank': 'True'}),
'wcs_instance': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'api_secrets'", 'to': u"orm['wcsinst.WcsInstance']"})
},
u'wcsinst.variable': {
'Meta': {'object_name': 'Variable'},
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'key': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
'value': ('django.db.models.fields.CharField', [], {'max_length': '1024', 'blank': 'True'}),
'wcs_instance': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'variables'", 'to': u"orm['wcsinst.WcsInstance']"})
},
u'wcsinst.wcsinstance': {
'Meta': {'object_name': 'WcsInstance'},
'backoffice_feed_url': ('django.db.models.fields.URLField', [], {'max_length': '128', 'blank': 'True'}),
'clicrdv': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
'domain': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'}),
'domino': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
'drupal': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
'ezldap': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'postgresql': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
'strongbox': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
'title': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '50'})
}
}
complete_apps = ['wcsinst']

View File

@ -15,10 +15,6 @@ class WcsInstance(models.Model):
# site-options.cfg options
postgresql = models.BooleanField(verbose_name=_('postgresql'),
blank=True)
saml2_use_role = models.BooleanField(verbose_name=_('use saml2 roles'),
blank=True)
saml2_role_prefix = models.CharField(verbose_name=_('role prefix'),
blank=True, max_length=128)
backoffice_feed_url = models.URLField(verbose_name=_('backoffice feed url'),
blank=True, max_length=128)
drupal = models.BooleanField(verbose_name=_('drupal'),
@ -39,8 +35,6 @@ class WcsInstance(models.Model):
def site_options_cfg(self):
d = {
'postgresql': self.postgresql,
'saml2_use_role': self.saml2_use_role,
'saml2_role_prefix': self.saml2_role_prefix,
'backoffice_feed_url': self.backoffice_feed_url,
'drupal': self.drupal,
'ezldap': self.ezldap,