Projet

Général

Profil

« Précédent | Suivant » 

Révision 55fa9cda

Ajouté par Serghei Mihai il y a environ 9 ans

storing organization client_id and client_secret in object extras

Voir les différences:

ckanext/ozwillo_organization_api/plugin.py
46 46
def create_organization(context, data_dict):
47 47
    context['ignore_auth'] = True
48 48
    model = context['model']
49
    session = context['session']
49 50

  
50 51
    destruction_secret = config.get(plugin_config_prefix + 'destruction_secret',
51 52
                                       'changeme')
......
100 101
        group.state = 'active'
101 102
        group.image_url = default_icon_url
102 103
        group.save()
104
        model.repo.new_revision()
105
        model.GroupExtra(group_id=group.id, key='client_id',
106
                         value=client_id).save()
107
        model.GroupExtra(group_id=group.id, key='client_secret',
108
                         value=client_secret).save()
109
        session.flush()
103 110

  
104 111
        # notify about organization creation
105 112
        services = {'services': [{

Formats disponibles : Unified diff