diff --git a/wcsinst/wcsinst/admin.py b/wcsinst/wcsinst/admin.py index 50ea427..9602e8e 100644 --- a/wcsinst/wcsinst/admin.py +++ b/wcsinst/wcsinst/admin.py @@ -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' )} diff --git a/wcsinst/wcsinst/migrations/0004_auto__del_field_wcsinstance_saml2_use_role__del_field_wcsinstance_saml.py b/wcsinst/wcsinst/migrations/0004_auto__del_field_wcsinstance_saml2_use_role__del_field_wcsinstance_saml.py new file mode 100644 index 0000000..d7d8173 --- /dev/null +++ b/wcsinst/wcsinst/migrations/0004_auto__del_field_wcsinstance_saml2_use_role__del_field_wcsinstance_saml.py @@ -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'] \ No newline at end of file diff --git a/wcsinst/wcsinst/models.py b/wcsinst/wcsinst/models.py index c9459c3..5590520 100644 --- a/wcsinst/wcsinst/models.py +++ b/wcsinst/wcsinst/models.py @@ -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,