コード例 #1
0
ファイル: core.py プロジェクト: SemmZemm/keystone
 def update_user(self, context, user_id, user_ref):
     user = user_ref.copy()
     if 'name' in user:
         user['name'] = clean.user_name(user['name'])
     if 'enabled' in user:
         user['enabled'] = clean.user_enabled(user['enabled'])
     return self.driver.update_user(user_id, user)
コード例 #2
0
ファイル: core.py プロジェクト: darren-wang/ks3
    def update_user(self, user_id, user_ref, initiator=None):
        old_user_ref = self.get_user(user_id)
        user = user_ref.copy()
        if 'name' in user:
            user['name'] = clean.user_name(user['name'])
        if 'enabled' in user:
            user['enabled'] = clean.user_enabled(user['enabled'])
        if 'domain_id' in user:
            self.resource_api.get_domain(user['domain_id'])
        if 'id' in user:
            if user_id != user['id']:
                raise exception.ValidationError(_('Cannot change user ID'))
            # Since any ID in the user dict is now irrelevant, remove its so as
            # the driver layer won't be confused by the fact the this is the
            # public ID not the local ID
            user.pop('id')

        self.get_user.invalidate(self, old_user_ref['id'])
        self.get_user_by_name.invalidate(self, old_user_ref['name'],
                                         old_user_ref['domain_id'])

        ref = self.driver.update_user(user_id, user)

        notifications.Audit.updated(self._USER, user_id, initiator)

        enabled_change = ((user.get('enabled') is False) and
                          user['enabled'] != old_user_ref.get('enabled'))
        if enabled_change or user.get('password') is not None:
            self.emit_invalidate_user_token_persistence(user_id)

        return ref
コード例 #3
0
ファイル: core.py プロジェクト: reeshupatel/demo
    def update_user(self, user_id, user_ref):
        user = user_ref.copy()
        if 'name' in user:
            user['name'] = clean.user_name(user['name'])
        if 'enabled' in user:
            user['enabled'] = clean.user_enabled(user['enabled'])
        if 'domain_id' in user:
            self.assignment_api.get_domain(user['domain_id'])
        if 'id' in user:
            if user_id != user['id']:
                raise exception.ValidationError(_('Cannot change user ID'))
            # Since any ID in the user dict is now irrelevant, remove its so as
            # the driver layer won't be confused by the fact the this is the
            # public ID not the local ID
            user.pop('id')

        domain_id, driver, entity_id = (
            self._get_domain_driver_and_entity_id(user_id))
        user = self._clear_domain_id_if_domain_unaware(driver, user)
        ref = driver.update_user(entity_id, user)
        if user.get('enabled') is False or user.get('password') is not None:
            if self.revoke_api:
                self.revoke_api.revoke_by_user(user_id)
            self.token_api.delete_tokens_for_user(user_id)
        return self._set_domain_id_and_mapping(
            ref, domain_id, driver, mapping.EntityType.USER)
コード例 #4
0
    def update_user(self, user_id, user_ref):
        old_user_ref = self.get_user(user_id)
        user = user_ref.copy()
        if 'name' in user:
            user['name'] = clean.user_name(user['name'])
        if 'enabled' in user:
            user['enabled'] = clean.user_enabled(user['enabled'])
        if 'domain_id' in user:
            self.resource_api.get_domain(user['domain_id'])
        if 'id' in user:
            if user_id != user['id']:
                raise exception.ValidationError(_('Cannot change user ID'))
            # Since any ID in the user dict is now irrelevant, remove its so as
            # the driver layer won't be confused by the fact the this is the
            # public ID not the local ID
            user.pop('id')

        domain_id, driver, entity_id = (
            self._get_domain_driver_and_entity_id(user_id))
        user = self._clear_domain_id_if_domain_unaware(driver, user)
        ref = driver.update_user(entity_id, user)

        enabled_change = ((user.get('enabled') is False)
                          and user['enabled'] != old_user_ref.get('enabled'))
        if enabled_change or user.get('password') is not None:
            self.emit_invalidate_user_token_persistence(user_id)

        return self._set_domain_id_and_mapping(ref, domain_id, driver,
                                               mapping.EntityType.USER)
コード例 #5
0
ファイル: kvs.py プロジェクト: zhangheng1442/openstack
    def create_user(self, user_id, user):
        user['name'] = clean.user_name(user['name'])
        try:
            self.get_user(user_id)
        except exception.UserNotFound:
            pass
        else:
            msg = 'Duplicate ID, %s.' % user_id
            raise exception.Conflict(type='user', details=msg)

        try:
            self.get_user_by_name(user['name'], user['domain_id'])
        except exception.UserNotFound:
            pass
        else:
            msg = 'Duplicate name, %s.' % user['name']
            raise exception.Conflict(type='user', details=msg)

        user = utils.hash_user_password(user)
        new_user = user.copy()

        new_user.setdefault('groups', [])

        self.db.set('user-%s' % user_id, new_user)
        self.db.set('user_name-%s' % new_user['name'], new_user)
        user_list = set(self.db.get('user_list', []))
        user_list.add(user_id)
        self.db.set('user_list', list(user_list))
        return identity.filter_user(new_user)
コード例 #6
0
 def update_user(self, user_id, user):
     user = self._validate_domain(user)
     if 'name' in user:
         user['name'] = clean.user_name(user['name'])
     if 'enabled' in user:
         user['enabled'] = clean.user_enabled(user['enabled'])
     return self._set_default_domain(self.user.update(user_id, user))
コード例 #7
0
ファイル: kvs.py プロジェクト: cmiii/keystone
    def create_user(self, user_id, user):
        user['name'] = clean.user_name(user['name'])
        try:
            self.get_user(user_id)
        except exception.UserNotFound:
            pass
        else:
            msg = 'Duplicate ID, %s.' % user_id
            raise exception.Conflict(type='user', details=msg)

        try:
            self.get_user_by_name(user['name'])
        except exception.UserNotFound:
            pass
        else:
            msg = 'Duplicate name, %s.' % user['name']
            raise exception.Conflict(type='user', details=msg)

        user = _ensure_hashed_password(user)
        self.db.set('user-%s' % user_id, user)
        self.db.set('user_name-%s' % user['name'], user)
        user_list = set(self.db.get('user_list', []))
        user_list.add(user_id)
        self.db.set('user_list', list(user_list))
        return user
コード例 #8
0
ファイル: kvs.py プロジェクト: bopopescu/Openstack-11
    def create_user(self, user_id, user):
        user['name'] = clean.user_name(user['name'])
        try:
            self.get_user(user_id)
        except exception.UserNotFound:
            pass
        else:
            msg = 'Duplicate ID, %s.' % user_id
            raise exception.Conflict(type='user', details=msg)

        try:
            self.get_user_by_name(user['name'])
        except exception.UserNotFound:
            pass
        else:
            msg = 'Duplicate name, %s.' % user['name']
            raise exception.Conflict(type='user', details=msg)

        user = _ensure_hashed_password(user)
        self.db.set('user-%s' % user_id, user)
        self.db.set('user_name-%s' % user['name'], user)
        user_list = set(self.db.get('user_list', []))
        user_list.add(user_id)
        self.db.set('user_list', list(user_list))
        return user
コード例 #9
0
ファイル: kvs.py プロジェクト: CiscoAS/keystone
    def create_user(self, user_id, user):
        user['name'] = clean.user_name(user['name'])
        try:
            self.get_user(user_id)
        except exception.UserNotFound:
            pass
        else:
            msg = 'Duplicate ID, %s.' % user_id
            raise exception.Conflict(type='user', details=msg)

        try:
            self.get_user_by_name(user['name'], user['domain_id'])
        except exception.UserNotFound:
            pass
        else:
            msg = 'Duplicate name, %s.' % user['name']
            raise exception.Conflict(type='user', details=msg)

        user = utils.hash_user_password(user)
        new_user = user.copy()

        new_user.setdefault('groups', [])

        self.db.set('user-%s' % user_id, new_user)
        self.db.set('user_name-%s' % new_user['name'], new_user)
        user_list = set(self.db.get('user_list', []))
        user_list.add(user_id)
        self.db.set('user_list', list(user_list))
        return identity.filter_user(new_user)
コード例 #10
0
 def update_user(self, user_id, user_ref):
     user = user_ref.copy()
     if 'name' in user:
         user['name'] = clean.user_name(user['name'])
     if 'enabled' in user:
         user['enabled'] = clean.user_enabled(user['enabled'])
     return self.driver.update_user(user_id, user)
コード例 #11
0
ファイル: core.py プロジェクト: akshat-kakkar/keystone
 def update_user(self, user_id, user):
     user = self._validate_domain(user)
     if 'name' in user:
         user['name'] = clean.user_name(user['name'])
     if 'enabled' in user:
         user['enabled'] = clean.user_enabled(user['enabled'])
     return self._set_default_domain(self.user.update(user_id, user))
コード例 #12
0
ファイル: sql.py プロジェクト: arcimboldo/keystone
 def create_user(self, user_id, user):
     user['name'] = clean.user_name(user['name'])
     user = utils.hash_user_password(user)
     session = self.get_session()
     with session.begin():
         user_ref = User.from_dict(user)
         session.add(user_ref)
         session.flush()
     return identity.filter_user(user_ref.to_dict())
コード例 #13
0
 def create_user(self, user_id, user):
     user['name'] = clean.user_name(user['name'])
     user = _ensure_hashed_password(user)
     session = self.get_session()
     with session.begin():
         user_ref = User.from_dict(user)
         session.add(user_ref)
         session.flush()
     return user_ref.to_dict()
コード例 #14
0
ファイル: sql.py プロジェクト: enolfc/keystone
 def create_user(self, user_id, user):
     user['name'] = clean.user_name(user['name'])
     user = utils.hash_user_password(user)
     session = self.get_session()
     with session.begin():
         user_ref = User.from_dict(user)
         session.add(user_ref)
         session.flush()
     return identity.filter_user(user_ref.to_dict())
コード例 #15
0
ファイル: sql.py プロジェクト: bbrahmbhatt/keystone
 def create_user(self, user_id, user):
     user["name"] = clean.user_name(user["name"])
     if "enabled" not in user:
         user["enabled"] = True
     user = utils.hash_user_password(user)
     session = self.get_session()
     with session.begin():
         user_ref = User.from_dict(user)
         session.add(user_ref)
         session.flush()
     return identity.filter_user(user_ref.to_dict())
コード例 #16
0
ファイル: core.py プロジェクト: baboune/keystone
    def update_user(self, user_id, user_ref, domain_scope=None):
        user = user_ref.copy()
        if 'name' in user:
            user['name'] = clean.user_name(user['name'])
        if 'enabled' in user:
            user['enabled'] = clean.user_enabled(user['enabled'])

        domain_id, driver = self._get_domain_id_and_driver(domain_scope)
        if not driver.is_domain_aware():
            user = self._clear_domain_id(user)
        ref = driver.update_user(user_id, user)
        if not driver.is_domain_aware():
            ref = self._set_domain_id(ref, domain_id)
        return ref
コード例 #17
0
ファイル: core.py プロジェクト: aboumawada/keystone
    def update_user(self, user_id, user_ref, domain_scope=None):
        user = user_ref.copy()
        if 'name' in user:
            user['name'] = clean.user_name(user['name'])
        if 'enabled' in user:
            user['enabled'] = clean.user_enabled(user['enabled'])

        domain_id, driver = self._get_domain_id_and_driver(domain_scope)
        if not driver.is_domain_aware():
            user = self._clear_domain_id(user)
        ref = driver.update_user(user_id, user)
        if not driver.is_domain_aware():
            ref = self._set_domain_id(ref, domain_id)
        return ref
コード例 #18
0
    def create_user(self, user_id, user_ref):
        user = user_ref.copy()
        user['name'] = clean.user_name(user['name'])
        user.setdefault('enabled', True)
        user['enabled'] = clean.user_enabled(user['enabled'])

        # For creating a user, the domain is in the object itself
        domain_id = user_ref['domain_id']
        driver = self._select_identity_driver(domain_id)
        if not driver.is_domain_aware():
            user = self._clear_domain_id(user)
        ref = driver.create_user(user_id, user)
        if not driver.is_domain_aware():
            ref = self._set_domain_id(ref, domain_id)
        return ref
コード例 #19
0
ファイル: core.py プロジェクト: baboune/keystone
    def create_user(self, user_id, user_ref):
        user = user_ref.copy()
        user['name'] = clean.user_name(user['name'])
        user.setdefault('enabled', True)
        user['enabled'] = clean.user_enabled(user['enabled'])

        # For creating a user, the domain is in the object itself
        domain_id = user_ref['domain_id']
        driver = self._select_identity_driver(domain_id)
        if not driver.is_domain_aware():
            user = self._clear_domain_id(user)
        ref = driver.create_user(user_id, user)
        if not driver.is_domain_aware():
            ref = self._set_domain_id(ref, domain_id)
        return ref
コード例 #20
0
ファイル: core.py プロジェクト: atheendra/keystone
    def update_user(self, user_id, user_ref, domain_scope=None):
        user = user_ref.copy()
        if 'name' in user:
            user['name'] = clean.user_name(user['name'])
        if 'enabled' in user:
            user['enabled'] = clean.user_enabled(user['enabled'])

        domain_id, driver = self._get_domain_id_and_driver(domain_scope)
        if not driver.is_domain_aware():
            user = self._clear_domain_id(user)
        ref = driver.update_user(user_id, user)
        if user.get('enabled') is False or user.get('password') is not None:
            self.token_api.delete_tokens_for_user(user_id)
        if not driver.is_domain_aware():
            ref = self._set_domain_id(ref, domain_id)
        return ref
コード例 #21
0
    def update_user(self, user_id, user_ref, domain_scope=None):
        user = user_ref.copy()
        if 'name' in user:
            user['name'] = clean.user_name(user['name'])
        if 'enabled' in user:
            user['enabled'] = clean.user_enabled(user['enabled'])

        domain_id, driver = self._get_domain_id_and_driver(domain_scope)
        if not driver.is_domain_aware():
            user = self._clear_domain_id(user)
        ref = driver.update_user(user_id, user)
        if user.get('enabled') is False or user.get('password') is not None:
            self.token_api.delete_tokens_for_user(user_id)
        if not driver.is_domain_aware():
            ref = self._set_domain_id(ref, domain_id)
        return ref
コード例 #22
0
ファイル: core.py プロジェクト: henriquetruta/keystone
    def update_user(self, user_id, user_ref, domain_scope=None):
        user = user_ref.copy()
        if "name" in user:
            user["name"] = clean.user_name(user["name"])
        if "enabled" in user:
            user["enabled"] = clean.user_enabled(user["enabled"])

        domain_id, driver = self._get_domain_id_and_driver(domain_scope)
        if not driver.is_domain_aware():
            user = self._clear_domain_id(user)
        ref = driver.update_user(user_id, user)
        if user.get("enabled") is False or user.get("password") is not None:
            if self.revoke_api:
                self.revoke_api.revoke_by_user(user_id)
            self.token_api.delete_tokens_for_user(user_id)
        if not driver.is_domain_aware():
            ref = self._set_domain_id(ref, domain_id)
        return ref
コード例 #23
0
ファイル: core.py プロジェクト: darren-wang/ks3
    def create_user(self, user_ref, initiator=None):
        user = user_ref.copy()
        user['name'] = clean.user_name(user['name'])
        user.setdefault('enabled', True)
        user['enabled'] = clean.user_enabled(user['enabled'])
        domain_id = user['domain_id']
        self.resource_api.get_domain(domain_id)

        # For creating a user, the domain is in the object itself
        domain_id = user_ref['domain_id']

        # Generate a local ID - in the future this might become a function of
        # the underlying driver so that it could conform to rules set down by
        # that particular driver type.
        user['id'] = uuid.uuid4().hex
        ref = self.driver.create_user(user['id'], user)
        notifications.Audit.created(self._USER, user['id'], initiator)
        return ref
コード例 #24
0
ファイル: core.py プロジェクト: reeshupatel/demo
    def create_user(self, user_ref):
        user = user_ref.copy()
        user['name'] = clean.user_name(user['name'])
        user.setdefault('enabled', True)
        user['enabled'] = clean.user_enabled(user['enabled'])
        domain_id = user['domain_id']
        self.assignment_api.get_domain(domain_id)

        # For creating a user, the domain is in the object itself
        domain_id = user_ref['domain_id']
        driver = self._select_identity_driver(domain_id)
        user = self._clear_domain_id_if_domain_unaware(driver, user)
        # Generate a local ID - in the future this might become a function of
        # the underlying driver so that it could conform to rules set down by
        # that particular driver type.
        user['id'] = uuid.uuid4().hex
        ref = driver.create_user(user['id'], user)
        return self._set_domain_id_and_mapping(
            ref, domain_id, driver, mapping.EntityType.USER)
コード例 #25
0
    def create_user(self, user_ref):
        user = user_ref.copy()
        user['name'] = clean.user_name(user['name'])
        user.setdefault('enabled', True)
        user['enabled'] = clean.user_enabled(user['enabled'])
        domain_id = user['domain_id']
        self.resource_api.get_domain(domain_id)

        # For creating a user, the domain is in the object itself
        domain_id = user_ref['domain_id']
        driver = self._select_identity_driver(domain_id)
        user = self._clear_domain_id_if_domain_unaware(driver, user)
        # Generate a local ID - in the future this might become a function of
        # the underlying driver so that it could conform to rules set down by
        # that particular driver type.
        user['id'] = uuid.uuid4().hex
        ref = driver.create_user(user['id'], user)
        return self._set_domain_id_and_mapping(ref, domain_id, driver,
                                               mapping.EntityType.USER)
コード例 #26
0
    def update_user(self, user_id, user):
        if 'name' in user:
            user['name'] = clean.user_name(user['name'])
        session = self.get_session()
        if 'id' in user and user_id != user['id']:
            raise exception.ValidationError('Cannot change user ID')
        with session.begin():
            user_ref = session.query(User).filter_by(id=user_id).first()
            if user_ref is None:
                raise exception.UserNotFound(user_id=user_id)
            old_user_dict = user_ref.to_dict()
            user = _ensure_hashed_password(user)
            for k in user:
                old_user_dict[k] = user[k]
            new_user = User.from_dict(old_user_dict)

            user_ref.name = new_user.name
            user_ref.extra = new_user.extra
            session.flush()
        return user_ref
コード例 #27
0
ファイル: kvs.py プロジェクト: zhangheng1442/openstack
 def update_user(self, user_id, user):
     if 'name' in user:
         user['name'] = clean.user_name(user['name'])
         existing = self.db.get('user_name-%s' % user['name'])
         if existing and user_id != existing['id']:
             msg = 'Duplicate name, %s.' % user['name']
             raise exception.Conflict(type='user', details=msg)
     # get the old name and delete it too
     try:
         old_user = self.db.get('user-%s' % user_id)
     except exception.NotFound:
         raise exception.UserNotFound(user_id=user_id)
     new_user = old_user.copy()
     user = utils.hash_user_password(user)
     new_user.update(user)
     if new_user['id'] != user_id:
         raise exception.ValidationError('Cannot change user ID')
     self.db.delete('user_name-%s' % old_user['name'])
     self.db.set('user-%s' % user_id, new_user)
     self.db.set('user_name-%s' % new_user['name'], new_user)
     return new_user
コード例 #28
0
ファイル: kvs.py プロジェクト: CiscoAS/keystone
 def update_user(self, user_id, user):
     if 'name' in user:
         user['name'] = clean.user_name(user['name'])
         existing = self.db.get('user_name-%s' % user['name'])
         if existing and user_id != existing['id']:
             msg = 'Duplicate name, %s.' % user['name']
             raise exception.Conflict(type='user', details=msg)
     # get the old name and delete it too
     try:
         old_user = self.db.get('user-%s' % user_id)
     except exception.NotFound:
         raise exception.UserNotFound(user_id=user_id)
     new_user = old_user.copy()
     user = utils.hash_user_password(user)
     new_user.update(user)
     if new_user['id'] != user_id:
         raise exception.ValidationError('Cannot change user ID')
     self.db.delete('user_name-%s' % old_user['name'])
     self.db.set('user-%s' % user_id, new_user)
     self.db.set('user_name-%s' % new_user['name'], new_user)
     return new_user
コード例 #29
0
ファイル: sql.py プロジェクト: bbrahmbhatt/keystone
 def update_user(self, user_id, user):
     if "name" in user:
         user["name"] = clean.user_name(user["name"])
     session = self.get_session()
     if "id" in user and user_id != user["id"]:
         raise exception.ValidationError("Cannot change user ID")
     with session.begin():
         user_ref = session.query(User).filter_by(id=user_id).first()
         if user_ref is None:
             raise exception.UserNotFound(user_id=user_id)
         old_user_dict = user_ref.to_dict()
         user = utils.hash_user_password(user)
         for k in user:
             old_user_dict[k] = user[k]
         new_user = User.from_dict(old_user_dict)
         for attr in User.attributes:
             if attr != "id":
                 setattr(user_ref, attr, getattr(new_user, attr))
         user_ref.extra = new_user.extra
         session.flush()
     return identity.filter_user(user_ref.to_dict(include_extra_dict=True))
コード例 #30
0
 def update_user(self, user_id, user):
     if 'name' in user:
         user['name'] = clean.user_name(user['name'])
     session = self.get_session()
     if 'id' in user and user_id != user['id']:
         raise exception.ValidationError('Cannot change user ID')
     with session.begin():
         user_ref = session.query(User).filter_by(id=user_id).first()
         if user_ref is None:
             raise exception.UserNotFound(user_id=user_id)
         old_user_dict = user_ref.to_dict()
         user = utils.hash_user_password(user)
         for k in user:
             old_user_dict[k] = user[k]
         new_user = User.from_dict(old_user_dict)
         for attr in User.attributes:
             if attr != 'id':
                 setattr(user_ref, attr, getattr(new_user, attr))
         user_ref.extra = new_user.extra
         session.flush()
     return identity.filter_user(user_ref.to_dict(include_extra_dict=True))
コード例 #31
0
ファイル: sql.py プロジェクト: akshat-kakkar/keystone
    def update_user(self, user_id, user):
        if 'name' in user:
            user['name'] = clean.user_name(user['name'])
        if 'enabled' in user:
            user['enabled'] = clean.user_enabled(user['enabled'])
        session = self.get_session()
        if 'id' in user and user_id != user['id']:
            raise exception.ValidationError('Cannot change user ID')

        with session.begin():
            user_ref = self._get_user(session, user_id)
            old_user_dict = user_ref.to_dict()
            user = utils.hash_user_password(user)
            for k in user:
                old_user_dict[k] = user[k]
            new_user = User.from_dict(old_user_dict)
            for attr in User.attributes:
                if attr != 'id':
                    setattr(user_ref, attr, getattr(new_user, attr))
            user_ref.extra = new_user.extra
            session.flush()
        return identity.filter_user(user_ref.to_dict(include_extra_dict=True))
コード例 #32
0
ファイル: sql.py プロジェクト: hungld/keystone
 def update_user(self, user_id, user):
     if 'name' in user:
         user['name'] = clean.user_name(user['name'])
     session = self.get_session()
     if 'id' in user and user_id != user['id']:
         raise exception.ValidationError('Cannot change user ID')
     # FIXME(henry-nash) Think about how we detect potential name clash
     # when we move domains
     with session.begin():
         user_ref = session.query(User).filter_by(id=user_id).first()
         if user_ref is None:
             raise exception.UserNotFound(user_id=user_id)
         old_user_dict = user_ref.to_dict()
         user = utils.hash_user_password(user)
         for k in user:
             old_user_dict[k] = user[k]
         new_user = User.from_dict(old_user_dict)
         for attr in User.attributes:
             if attr != 'id':
                 setattr(user_ref, attr, getattr(new_user, attr))
         user_ref.extra = new_user.extra
         session.flush()
     return identity.filter_user(user_ref.to_dict(include_extra_dict=True))
コード例 #33
0
ファイル: core.py プロジェクト: radez/keystone
 def create_user(self, user_id, user):
     user['name'] = clean.user_name(user['name'])
     return self.user.create(user)
コード例 #34
0
 def create_user(self, user_id, user):
     user['name'] = clean.user_name(user['name'])
     return self.user.create(user)
コード例 #35
0
ファイル: core.py プロジェクト: KnightBaron/keystone
 def create_user(self, user_id, user):
     user['name'] = clean.user_name(user['name'])
     user['enabled'] = clean.user_enabled(user.get('enabled', True))
     return identity.filter_user(self.user.create(user))
コード例 #36
0
ファイル: core.py プロジェクト: a3linux/keystone
 def create_user(self, user_id, user):
     user['name'] = clean.user_name(user['name'])
     return identity.filter_user(self.user.create(user))
コード例 #37
0
 def create_user(self, user_id, user_ref):
     user = user_ref.copy()
     user['name'] = clean.user_name(user['name'])
     user.setdefault('enabled', True)
     user['enabled'] = clean.user_enabled(user['enabled'])
     return self.driver.create_user(user_id, user)
コード例 #38
0
ファイル: core.py プロジェクト: hungld/keystone
 def update_user(self, user_id, user):
     if "name" in user:
         user["name"] = clean.user_name(user["name"])
     return self.user.update(user_id, user)
コード例 #39
0
ファイル: core.py プロジェクト: akshat-kakkar/keystone
 def create_user(self, user_id, user):
     user = self._validate_domain(user)
     user['name'] = clean.user_name(user['name'])
     user['enabled'] = clean.user_enabled(user.get('enabled', True))
     user_ref = self.user.create(user)
     return self._set_default_domain(identity.filter_user(user_ref))
コード例 #40
0
ファイル: core.py プロジェクト: radez/keystone
 def update_user(self, user_id, user):
     if 'name' in user:
         user['name'] = clean.user_name(user['name'])
     return self.user.update(user_id, user)
コード例 #41
0
ファイル: core.py プロジェクト: Manikgoyal/keystone
 def create_user(self, user_id, user):
     user['name'] = clean.user_name(user['name'])
     return identity.filter_user(self.user.create(user))
コード例 #42
0
ファイル: core.py プロジェクト: SemmZemm/keystone
 def create_user(self, context, user_id, user_ref):
     user = user_ref.copy()
     user['name'] = clean.user_name(user['name'])
     user.setdefault('enabled', True)
     user['enabled'] = clean.user_enabled(user['enabled'])
     return self.driver.create_user(user_id, user)
コード例 #43
0
 def create_user(self, user_id, user):
     user['name'] = clean.user_name(user['name'])
     unfiltered_user = self.user.create(user)
     filtered = identity.filter_user(unfiltered_user)
     return filtered
コード例 #44
0
 def create_user(self, user_id, user):
     user = self._validate_domain(user)
     user['name'] = clean.user_name(user['name'])
     user['enabled'] = clean.user_enabled(user.get('enabled', True))
     user_ref = self.user.create(user)
     return self._set_default_domain(identity.filter_user(user_ref))
コード例 #45
0
ファイル: core.py プロジェクト: a3linux/keystone
 def update_user(self, user_id, user):
     if 'name' in user:
         user['name'] = clean.user_name(user['name'])
     return self.user.update(user_id, user)
コード例 #46
0
 def create_user(self, user_id, user):
     user['name'] = clean.user_name(user['name'])
     user['enabled'] = clean.user_enabled(user.get('enabled', True))
     return identity.filter_user(self.user.create(user))