]> git.parisson.com Git - mezzo.git/commitdiff
[MERGE] : mezzo/dev into dev
authorEmilie <zawadzki@ircam.fr>
Fri, 8 Dec 2017 11:40:48 +0000 (12:40 +0100)
committerEmilie <zawadzki@ircam.fr>
Fri, 8 Dec 2017 11:40:48 +0000 (12:40 +0100)
1  2 
.gitmodules
app/local_settings.py
app/settings.py

diff --cc .gitmodules
index 9eb014018225abe0e08366931cda062963e1b2f8,65e5b8bb87b981c7aaac1bf34a68d48e371d6cc5..6201751297dfcbc221dc6e3062b5bde24aad9428
  [submodule "lib/mezzanine-organization"]
        path = lib/mezzanine-organization
        url = https://github.com/Ircam-Web/mezzanine-organization.git
-       branch-master = master
-       branch-dev = master
+     branch-master = mezzo
+     branch-dev = mezzo
+     ignore = dirty
 +[submodule "var"]
 +      path = var
 +      url = git+ssh://git@git.forge.ircam.fr/ircam-www-data.git
 +    ignore = dirty
 +      branch-master = master
 +      branch-dev = master
  [submodule "lib/cartridge"]
        path = lib/cartridge
      url = https://github.com/Ircam-Web/cartridge.git
index 9fca1674a8f9889d35b4a1b38d4e7b361c3a232d,5d05c65fd5a0001e20e57922238ac20af02f0ab4..da21d1477feea4c4a25c4200cfe9af57261056f2
@@@ -54,13 -83,7 +83,16 @@@ FIGGO_API_HEADER_AUTH='Lucca applicatio
  
  # HOST_THEMES = [
  #     ('manifeste.ircam.fr', 'themes.base'),
+ #     ('vertigo.ircam.fr', 'organization_themes.vertigo-themes.vertigo_ircam_fr'),
+ #     ('vertigo.starts.eu', 'organization_themes.vertigo-themes.vertigo_starts_eu'),
+ #     ('www.starts.eu', 'organization_themes.vertigo-themes.www_starts_eu'),
  # ]
 +
 +if DEBUG:
 +    PROTOCOLE = "http://"
 +else:
 +    PROTOCOLE = "https://"
 +
 +HAL_URL_PART_1 = PROTOCOLE + "haltools.archives-ouvertes.fr/Public/afficheRequetePubli.php?labos_exp=%s&affi_exp=%s"
 +HAL_URL_PART_2 = "&CB_auteur=oui&CB_titre=oui&CB_article=oui&langue=Anglais&tri_exp=annee_publi&tri_exp2=typdoc" \
 +                "&tri_exp3=date_publi&ordre_aff=TA&Fen=Aff&css=" + PROTOCOLE + "%s/static/css/index.min.css"
diff --cc app/settings.py
index 7b0d5519919e3c2e6488be3470a4b26d7d66f2a4,d471d0ba90d134b3415cd98574a4c1d8d343d21a..094fc240966618c0154ee4b96ff6dc7aaa3f6664
@@@ -24,8 -24,8 +24,9 @@@ from __future__ import absolute_import
  
  import os
  from django.utils.translation import ugettext_lazy as _
 +from django.core.urlresolvers import reverse_lazy
  import ldap, logging
+ from django.core.urlresolvers import reverse_lazy
  from django_auth_ldap.config import LDAPSearch, GroupOfNamesType
  
  DEBUG = True if os.environ.get('DEBUG') == 'True' else False
@@@ -613,38 -616,24 +616,45 @@@ if DEBUG 
  
  # 1 - Activate logging :
  # logging
 -if DEBUG:
 -    logger = logging.getLogger('django_auth_ldap')
 -    logger.addHandler(logging.StreamHandler())
 -    logger.setLevel(logging.DEBUG)
 +if DEBUG:
 +    logger = logging.getLogger('django_auth_ldap')
 +    logger.addHandler(logging.StreamHandler())
 +    logger.setLevel(logging.DEBUG)
  
  # 2 - Specify your LDAP settings :
 -# https://django-auth-ldap.readthedocs.io/en/latest/
 +AUTH_LDAP_SERVER_URI = "ldap://clusterldap1.ircam.fr"
 +AUTH_LDAP_USER_SEARCH = LDAPSearch("ou=People,dc=ircam,dc=fr", ldap.SCOPE_SUBTREE, "(uid=%(user)s)")
 +
 +# Set up the basic group parameters.
 +AUTH_LDAP_GROUP_SEARCH = LDAPSearch("ou=People,dc=ircam,dc=fr",
 +    ldap.SCOPE_SUBTREE, "(objectClass=groupOfNames)"
 +)
 +AUTH_LDAP_GROUP_TYPE = GroupOfNamesType(name_attr="cn")
 +
 +# Populate the Django user from the LDAP directory.
 +AUTH_LDAP_USER_ATTR_MAP = {
 +    "first_name": "givenName",
 +    "last_name": "sn",
 +    "email": "mail"
 +}
 +
 +# This is the default, but I like to be explicit.
 +AUTH_LDAP_ALWAYS_UPDATE_USER = True
 +
 +# Use LDAP group membership to calculate group permissions.
 +AUTH_LDAP_FIND_GROUP_PERMS = True
  
 -# 3 - Activate LDAP Backend 
 -# Please see AUTHENTICATION_BACKENDS
 +# Cache group memberships for an hour to minimize LDAP traffic
 +AUTH_LDAP_CACHE_GROUPS = True
 +AUTH_LDAP_GROUP_CACHE_TIMEOUT = 3600
  
+ ##################
+ #### GUARDIAN ####
+ ##################
+ ANONYMOUS_USER_NAME = None
+ LOGIN_REDIRECT_URL = reverse_lazy('organization-network-person-detail')
  ##################
  # LOCAL SETTINGS #
  ##################