예제 #1
0
    def test_update_user(self):
        ia = self.fake_client_set.identity_admin
        # prepare
        (name, email, passw) = ('user-upd', '*****@*****.**', 'orange')

        fullname = "User Userovich Upd"
        ia.users.get('new-user').AndReturn('new-user')
        ia.users.update('new-user', name=name, email=email,
                        fullname=fullname).AndReturn('new-user')
        ia.users.update_password('new-user', passw).AndReturn('new-user')
        ia.users.get('new-user').AndReturn('new-user')
        users.user_to_view('new-user').AndReturn('new-user-dict')
        self.mox.ReplayAll()
        # test
        post_params = {
                       "name": name,
                       "email": email,
                       "password": passw,
                       "fullname": fullname
                      }
        rv = self.client.put('/v1/users/new-user',
                              data=json.dumps(post_params),
                              content_type='application/json')

        data = self.check_and_parse_response(rv)
        self.assertEquals(data, 'new-user-dict')
예제 #2
0
    def test_update_user(self):
        ia = self.fake_client_set.identity_admin
        # prepare
        (name, email, passw) = ('user-upd', '*****@*****.**', 'orange')

        fullname = "User Userovich Upd"
        ia.users.get('new-user').AndReturn('new-user')
        ia.users.update('new-user', name=name, email=email,
                        fullname=fullname).AndReturn('new-user')
        ia.users.update_password('new-user', passw).AndReturn('new-user')
        ia.users.get('new-user').AndReturn('new-user')
        users.user_to_view('new-user').AndReturn('new-user-dict')
        self.mox.ReplayAll()
        # test
        post_params = {
            "name": name,
            "email": email,
            "password": passw,
            "fullname": fullname
        }
        rv = self.client.put('/v1/users/new-user',
                             data=json.dumps(post_params),
                             content_type='application/json')

        data = self.check_and_parse_response(rv)
        self.assertEquals(data, 'new-user-dict')
예제 #3
0
    def test_create_user_with_projects(self):
        client = self.fake_client_set
        (name, email, passw) = ('user-a', '*****@*****.**', 'bananas')

        client.identity_admin.users.list().AndReturn([self.user])
        client.identity_admin.users.create(name=name,
                                           password=passw,
                                           email=email,
                                           enabled=True).AndReturn('new-user')
        users.member_role_id().AndReturn('member-role')
        client.identity_admin.roles.add_user_role(user='******',
                                                  role='member-role',
                                                  tenant='PID1')
        client.identity_admin.roles.add_user_role(user='******',
                                                  role='member-role',
                                                  tenant='PID2')
        users.user_to_view('new-user').AndReturn('new-user-dict')
        self.mox.ReplayAll()

        data = self._interact({
            "name": name,
            "email": email,
            "password": passw,
            "projects": ['PID1', 'PID2'],
            "admin": False,
        })
        self.assertEquals(data, 'new-user-dict')
예제 #4
0
    def test_get_me(self):
        self.fake_client_set.http_client.access['user']['id'] = 'user-a'
        self.fake_client_set.identity_admin.users\
                .get('user-a').AndReturn('user-a')
        users.user_to_view('user-a').AndReturn('dict-a')
        self.mox.ReplayAll()

        rv = self.client.get('/v1/me')
        data = self.check_and_parse_response(rv)
        self.assertEquals(data, 'dict-a')
예제 #5
0
    def test_get_me(self):
        self.fake_client_set.http_client.access['user']['id'] = 'user-a'
        self.fake_client_set.identity_admin.users\
                .get('user-a').AndReturn('user-a')
        users.user_to_view('user-a').AndReturn('dict-a')
        self.mox.ReplayAll()

        rv = self.client.get('/v1/me')
        data = self.check_and_parse_response(rv)
        self.assertEquals(data, 'dict-a')
예제 #6
0
 def test_get_user(self):
     # prepare
     self.fake_client_set.identity_admin.users\
             .get('user-a').AndReturn('user-a')
     users.user_to_view('user-a').AndReturn('dict-a')
     self.mox.ReplayAll()
     # test
     rv = self.client.get('/v1/users/user-a')
     # verify
     data = self.check_and_parse_response(rv)
     self.assertEquals(data, 'dict-a')
예제 #7
0
 def test_get_user(self):
     # prepare
     self.fake_client_set.identity_admin.users\
             .get('user-a').AndReturn('user-a')
     users.user_to_view('user-a').AndReturn('dict-a')
     self.mox.ReplayAll()
     # test
     rv = self.client.get('/v1/users/user-a')
     # verify
     data = self.check_and_parse_response(rv)
     self.assertEquals(data, 'dict-a')
예제 #8
0
    def test_resend_no_mail(self):
        ConfigDAO.get('invitations', 'enabled').AndReturn(True)
        self.fake_client_set.identity_admin.users.get(self.uid)\
                .AndReturn(self.user)
        users.InvitesDAO.create(self.uid, self.user.email)\
                .AndReturn(self.invite)
        users.auth.assert_admin()
        users.user_to_view(self.user, self.invite, send_code=True)\
                .AndReturn('REPLY')

        self.mox.ReplayAll()
        data = self.interact({'send-invite-mail': False})
        self.assertEquals(data, 'REPLY')
예제 #9
0
    def test_resend_no_mail(self):
        ConfigDAO.get('invitations', 'enabled').AndReturn(True)
        self.fake_client_set.identity_admin.users.get(self.uid)\
                .AndReturn(self.user)
        users.InvitesDAO.create(self.uid, self.user.email)\
                .AndReturn(self.invite)
        users.auth.assert_admin()
        users.user_to_view(self.user, self.invite, send_code=True)\
                .AndReturn('REPLY')

        self.mox.ReplayAll()
        data = self.interact({'send-invite-mail': False})
        self.assertEquals(data, 'REPLY')
예제 #10
0
    def test_resend_works(self):
        ConfigDAO.get('invitations', 'enabled').AndReturn(True)
        self.fake_client_set.identity_admin.users.get(self.uid)\
                .AndReturn(self.user)
        users.InvitesDAO.create(self.uid, self.user.email)\
                .AndReturn(self.invite)
        users.send_invitation(self.user.email, self.invite.code,
                              None, greeting=self.user.fullname)
        users.user_to_view(self.user, self.invite, send_code=False)\
                .AndReturn('REPLY')

        self.mox.ReplayAll()
        data = self.interact({})
        self.assertEquals(data, 'REPLY')
예제 #11
0
    def test_user_to_view_with_my_projects(self):
        tenant = doubles.make(self.mox, doubles.Tenant, id='PID', name='ptest')
        user = doubles.make(self.mox,
                            doubles.User,
                            id=u'42',
                            name=u'iv',
                            email=u'*****@*****.**',
                            fullname=u'Example User',
                            enabled=True)

        user.list_roles().AndReturn(self.roles)
        self.fake_client_set.identity_public.tenants.list()\
                .AndReturn([tenant])

        expected_projects = [{
            u'id': 'PID',
            u'name': 'ptest',
            u'href': '/v1/projects/PID'
        }]
        self.mox.ReplayAll()

        with self.app.test_request_context():
            self.install_fake_auth()
            flask.g.my_projects = True
            data = users.user_to_view(user)
        self.assertEquals(data['projects'], expected_projects)
예제 #12
0
    def test_user_to_view_invite(self):
        user = doubles.make(self.mox,
                            doubles.User,
                            id=u'42',
                            name=u'iv',
                            email=u'*****@*****.**',
                            fullname=u'Example User',
                            enabled=False)
        date = datetime(2012, 9, 15, 15, 03, 00)
        invite = Token(user_id=user.id, created_at=date, complete=False)

        user.list_roles().AndReturn([])
        users.InvitesDAO.get_for_user(user.id).AndReturn(invite)

        expected = {
            u'id': u'42',
            u'name': u'iv',
            u'href': u'/v1/users/42',
            u'email': u'*****@*****.**',
            u'fullname': 'Example User',
            u'admin': False,
            u'projects': [],
            u'completed-registration': False,
            u'invited-at': date,
            u'links': {
                u'send-invite': '/v1/users/42/send-invite',
                u'ssh-keys': '/v1/users/42/ssh-keys/',
            }
        }

        self.mox.ReplayAll()
        with self.app.test_request_context():
            self.install_fake_auth()
            data = users.user_to_view(user)
        self.assertEquals(data, expected)
예제 #13
0
    def test_user_to_view_send_invite_code(self):
        """What we got when resending invite without disabling user"""
        user = doubles.make(self.mox, doubles.User,
                            id=u'42', name=u'iv', email=u'*****@*****.**',
                            fullname=u'Example User', enabled=True)
        date = datetime(2012, 9, 15, 15, 03, 00)
        invite = Token(user_id=user.id, created_at=date,
                       complete=False, code='THE_CODE')

        user.list_roles().AndReturn([])
        expected = {
            u'id': u'42',
            u'name': u'iv',
            u'href': u'/v1/users/42',
            u'email': u'*****@*****.**',
            u'fullname': 'Example User',
            u'admin': False,
            u'projects': [],
            u'completed-registration': True,  # because user can work
            u'invited-at': date,
            u'invitation-code': 'THE_CODE',
            u'links': {
                u'send-invite': '/v1/users/42/send-invite',
                u'ssh-keys': '/v1/users/42/ssh-keys/',
            }
        }

        self.mox.ReplayAll()
        with self.app.test_request_context():
            self.install_fake_auth()
            data = users.user_to_view(user, invite, send_code=True)
        self.assertEquals(data, expected)
예제 #14
0
    def test_update_self(self):
        users.fetch_user(self.user.id, False).AndReturn(self.user)
        self.fake_client_set.identity_admin \
                    .users.update(self.user, name=self.name) \
                    .AndReturn('new-user')

        users.fetch_user(self.user.id, False).AndReturn('new-user')
        users.user_to_view('new-user').AndReturn('new-user-dict')
        self.mox.ReplayAll()

        post_params = {"name": self.name}
        rv = self.client.put('/v1/users/%s' % self.user.id,
                             data=json.dumps(post_params),
                             content_type='application/json')
        data = self.check_and_parse_response(rv)
        self.assertEquals(data, 'new-user-dict')
예제 #15
0
    def test_update_self(self):
        users.fetch_user(self.user.id, False).AndReturn(self.user)
        self.fake_client_set.identity_admin \
                    .users.update(self.user, name=self.name) \
                    .AndReturn('new-user')

        users.fetch_user(self.user.id, False).AndReturn('new-user')
        users.user_to_view('new-user').AndReturn('new-user-dict')
        self.mox.ReplayAll()

        post_params = { "name": self.name }
        rv = self.client.put('/v1/users/%s' % self.user.id,
                              data=json.dumps(post_params),
                              content_type='application/json')
        data = self.check_and_parse_response(rv)
        self.assertEquals(data, 'new-user-dict')
예제 #16
0
    def test_user_to_view_disabled_noadmin(self):
        user = doubles.make(self.mox, doubles.User,
                            id=u'42', name=u'iv', email=u'*****@*****.**',
                            fullname=u'Example User', enabled=False)

        user.list_roles().AndReturn([])
        users.InvitesDAO.get_for_user(user.id).AndReturn(None)

        expected = {
            u'id': u'42',
            u'name': u'iv',
            u'href': u'/v1/users/42',
            u'email': u'*****@*****.**',
            u'fullname': 'Example User',
            u'admin': False,
            u'projects': [],
            u'completed-registration': False,
            u'links': {
                u'send-invite': '/v1/users/42/send-invite',
                u'ssh-keys': '/v1/users/42/ssh-keys/',
            }
        }

        self.mox.ReplayAll()

        with self.app.test_request_context():
            self.install_fake_auth()
            data = users.user_to_view(user)
        self.assertEquals(data, expected)
예제 #17
0
    def test_resend_works(self):
        ConfigDAO.get('invitations', 'enabled').AndReturn(True)
        self.fake_client_set.identity_admin.users.get(self.uid)\
                .AndReturn(self.user)
        users.InvitesDAO.create(self.uid, self.user.email)\
                .AndReturn(self.invite)
        users.send_invitation(self.user.email,
                              self.invite.code,
                              None,
                              greeting=self.user.fullname)
        users.user_to_view(self.user, self.invite, send_code=False)\
                .AndReturn('REPLY')

        self.mox.ReplayAll()
        data = self.interact({})
        self.assertEquals(data, 'REPLY')
예제 #18
0
    def test_update_grant_admin(self):
        client = self.fake_client_set
        uid = u'user-a'

        user = doubles.make(self.mox, doubles.User, id=uid)
        client.identity_admin.users.get(uid).AndReturn(user)
        client.identity_admin.roles.add_user_role(u'user-a', u'ADMIN_ROLE_ID',
                                                  u'SYSTENANT_ID')
        client.identity_admin.users.get(uid).AndReturn('same-user')
        users.user_to_view('same-user').AndReturn('REPLY')

        self.mox.ReplayAll()
        rv = self.client.put(u'/v1/users/%s' % uid,
                             data=json.dumps({'admin': True}),
                             content_type='application/json')
        data = self.check_and_parse_response(rv)
        self.assertEquals(data, 'REPLY')
예제 #19
0
    def test_update_revoke_admin(self):
        client = self.fake_client_set
        uid = u'user-a'

        user = doubles.make(self.mox, doubles.User, id=uid)
        client.identity_admin.users.get(uid).AndReturn(user)
        client.identity_admin.roles.remove_user_role(
            u'user-a', u'ADMIN_ROLE_ID', u'SYSTENANT_ID')
        client.identity_admin.users.get(uid).AndReturn('same-user')
        users.user_to_view('same-user').AndReturn('REPLY')

        self.mox.ReplayAll()
        rv = self.client.put(u'/v1/users/%s' % uid,
                             data=json.dumps({'admin': False}),
                             content_type='application/json')
        data = self.check_and_parse_response(rv)
        self.assertEquals(data, 'REPLY')
예제 #20
0
    def test_list_users(self):
        self.fake_client_set.identity_admin \
                .users.list().AndReturn(['user-a', 'user-b'])
        users.user_to_view('user-a').AndReturn('dict-a')
        users.user_to_view('user-b').AndReturn('dict-b')
        expected = {
            'collection': {
                'name': 'users',
                'size': 2
            },
            'users': [ 'dict-a', 'dict-b' ]
        }

        self.mox.ReplayAll()

        rv = self.client.get('/v1/users/')
        data = self.check_and_parse_response(rv)
        self.assertEquals(data, expected)
예제 #21
0
    def test_list_users(self):
        self.fake_client_set.identity_admin \
                .users.list().AndReturn(['user-a', 'user-b'])
        users.user_to_view('user-a').AndReturn('dict-a')
        users.user_to_view('user-b').AndReturn('dict-b')
        expected = {
            'collection': {
                'name': 'users',
                'size': 2
            },
            'users': ['dict-a', 'dict-b']
        }

        self.mox.ReplayAll()

        rv = self.client.get('/v1/users/')
        data = self.check_and_parse_response(rv)
        self.assertEquals(data, expected)
예제 #22
0
    def test_update_revoke_admin_idempotent(self):
        client = self.fake_client_set
        uid = u'user-a'

        user = doubles.make(self.mox, doubles.User, id=uid)
        client.identity_admin.users.get(uid).AndReturn(user)
        client.identity_admin.roles.remove_user_role(
            u'user-a', u'ADMIN_ROLE_ID', u'SYSTENANT_ID')\
                .AndRaise(osc_exc.NotFound('failure'))
        # raised, but nothing should happen
        client.identity_admin.users.get(uid).AndReturn('same-user')
        users.user_to_view('same-user').AndReturn('REPLY')

        self.mox.ReplayAll()
        rv = self.client.put(u'/v1/users/%s' % uid,
                             data=json.dumps({'admin': False}),
                             content_type='application/json')
        data = self.check_and_parse_response(rv)
        self.assertEquals(data, 'REPLY')
예제 #23
0
    def test_create_admin(self):
        client = self.fake_client_set
        new_user = doubles.make(self.mox, doubles.User, id='NUID')
        (name, email, passw) = ('user-a', '*****@*****.**', 'bananas')

        client.identity_admin.users.list().AndReturn([self.user])
        client.identity_admin.users.create(
            name=name, password=passw, email=email,
            enabled=True).AndReturn(new_user)

        # see doubles.py, near line 100 for role id and tenant id here
        client.identity_admin.roles.add_user_role(
            'NUID', u'ADMIN_ROLE_ID', u'SYSTENANT_ID')
        users.user_to_view(new_user).AndReturn('new-user-dict')

        self.mox.ReplayAll()
        data = self._interact({"name": name, "email": email,
                               "password": passw, "admin": True})
        self.assertEquals(data, 'new-user-dict')
예제 #24
0
    def test_create_user(self):
        client = self.fake_client_set
        (name, email, passw) = ('user-a', '*****@*****.**', 'bananas')
        fullname = "User Userovich"

        client.identity_admin.users.list().AndReturn([self.user])
        client.identity_admin.users.create(
            name=name, password=passw, email=email,
            enabled=True).AndReturn('new-user')
        client.identity_admin.users.update('new-user', fullname=fullname)
        users.user_to_view('new-user').AndReturn('new-user-dict')
        self.mox.ReplayAll()

        data = self._interact({
            "email": email,
            "password": passw,
            "fullname": fullname,
            "admin": False,
        })
        self.assertEquals(data, 'new-user-dict')
예제 #25
0
    def test_create_user(self):
        client = self.fake_client_set
        (name, email, passw) = ('user-a', '*****@*****.**', 'bananas')
        fullname = "User Userovich"

        client.identity_admin.users.list().AndReturn([self.user])
        client.identity_admin.users.create(name=name,
                                           password=passw,
                                           email=email,
                                           enabled=True).AndReturn('new-user')
        client.identity_admin.users.update('new-user', fullname=fullname)
        users.user_to_view('new-user').AndReturn('new-user-dict')
        self.mox.ReplayAll()

        data = self._interact({
            "email": email,
            "password": passw,
            "fullname": fullname,
            "admin": False,
        })
        self.assertEquals(data, 'new-user-dict')
예제 #26
0
def accept_invite(code):
    data = parse_request_data(_ACCEPT_SCHEMA, _ACCEPT_REQUIRES)
    invite, user = _invite_and_user(code)

    data['enabled'] = True
    try:
        update_user_data(user, data)
        user = auth.admin_client_set().identity_admin.users.get(user.id)
    except osc_exc.NotFound:
        abort(404)

    InvitesDAO.complete_for_user(user.id)
    return make_json_response(user_to_view(user, invite), 200)
예제 #27
0
파일: invites.py 프로젝트: altai/altai-api
def accept_invite(code):
    data = parse_request_data(_ACCEPT_SCHEMA, _ACCEPT_REQUIRES)
    invite, user = _invite_and_user(code)

    data['enabled'] = True
    try:
        update_user_data(user, data)
        user = auth.admin_client_set().identity_admin.users.get(user.id)
    except osc_exc.NotFound:
        abort(404)

    InvitesDAO.complete_for_user(user.id)
    return make_json_response(user_to_view(user, invite), 200)
예제 #28
0
    def test_create_admin(self):
        client = self.fake_client_set
        new_user = doubles.make(self.mox, doubles.User, id='NUID')
        (name, email, passw) = ('user-a', '*****@*****.**', 'bananas')

        client.identity_admin.users.list().AndReturn([self.user])
        client.identity_admin.users.create(name=name,
                                           password=passw,
                                           email=email,
                                           enabled=True).AndReturn(new_user)

        # see doubles.py, near line 100 for role id and tenant id here
        client.identity_admin.roles.add_user_role('NUID', u'ADMIN_ROLE_ID',
                                                  u'SYSTENANT_ID')
        users.user_to_view(new_user).AndReturn('new-user-dict')

        self.mox.ReplayAll()
        data = self._interact({
            "name": name,
            "email": email,
            "password": passw,
            "admin": True
        })
        self.assertEquals(data, 'new-user-dict')
예제 #29
0
    def test_create_user_with_projects(self):
        client = self.fake_client_set
        (name, email, passw) = ('user-a', '*****@*****.**', 'bananas')

        client.identity_admin.users.list().AndReturn([self.user])
        client.identity_admin.users.create(
            name=name, password=passw, email=email,
            enabled=True).AndReturn('new-user')
        users.member_role_id().AndReturn('member-role')
        client.identity_admin.roles.add_user_role(
            user='******', role='member-role', tenant='PID1')
        client.identity_admin.roles.add_user_role(
            user='******', role='member-role', tenant='PID2')
        users.user_to_view('new-user').AndReturn('new-user-dict')
        self.mox.ReplayAll()

        data = self._interact({
            "name": name,
            "email": email,
            "password": passw,
            "projects": ['PID1', 'PID2'],
            "admin": False,
        })
        self.assertEquals(data, 'new-user-dict')
예제 #30
0
    def test_user_to_view_works(self):
        user = doubles.make(self.mox,
                            doubles.User,
                            id=u'42',
                            name=u'iv',
                            email=u'*****@*****.**',
                            fullname=u'Example User',
                            enabled=True)
        user.list_roles().AndReturn(self.roles)

        expected = {
            u'id':
            u'42',
            u'name':
            u'iv',
            u'href':
            u'/v1/users/42',
            u'email':
            u'*****@*****.**',
            u'fullname':
            'Example User',
            u'admin':
            True,
            u'projects': [{
                u'id': 'PID',
                u'name': 'ptest',
                u'href': '/v1/projects/PID'
            }, {
                u'id': 'PID2',
                u'name': 'other',
                u'href': '/v1/projects/PID2'
            }],
            u'completed-registration':
            True,
            u'links': {
                u'send-invite': '/v1/users/42/send-invite',
                u'ssh-keys': '/v1/users/42/ssh-keys/',
            }
        }

        self.mox.ReplayAll()

        with self.app.test_request_context():
            self.install_fake_auth()
            data = users.user_to_view(user)
        self.assertEquals(data, expected)
예제 #31
0
    def test_user_to_view_works(self):
        user = doubles.make(self.mox, doubles.User,
                            id=u'42', name=u'iv', email=u'*****@*****.**',
                            fullname=u'Example User', enabled=True)
        user.list_roles().AndReturn(self.roles)

        expected = {
            u'id': u'42',
            u'name': u'iv',
            u'href': u'/v1/users/42',
            u'email': u'*****@*****.**',
            u'fullname': 'Example User',
            u'admin': True,
            u'projects': [
                {
                    u'id': 'PID',
                    u'name': 'ptest',
                    u'href': '/v1/projects/PID'
                },
                {
                    u'id': 'PID2',
                    u'name': 'other',
                    u'href': '/v1/projects/PID2'
                }
            ],
            u'completed-registration': True,
            u'links': {
                u'send-invite': '/v1/users/42/send-invite',
                u'ssh-keys': '/v1/users/42/ssh-keys/',
            }
        }

        self.mox.ReplayAll()

        with self.app.test_request_context():
            self.install_fake_auth()
            data = users.user_to_view(user)
        self.assertEquals(data, expected)
예제 #32
0
    def test_user_to_view_send_invite_code(self):
        """What we got when resending invite without disabling user"""
        user = doubles.make(self.mox,
                            doubles.User,
                            id=u'42',
                            name=u'iv',
                            email=u'*****@*****.**',
                            fullname=u'Example User',
                            enabled=True)
        date = datetime(2012, 9, 15, 15, 03, 00)
        invite = Token(user_id=user.id,
                       created_at=date,
                       complete=False,
                       code='THE_CODE')

        user.list_roles().AndReturn([])
        expected = {
            u'id': u'42',
            u'name': u'iv',
            u'href': u'/v1/users/42',
            u'email': u'*****@*****.**',
            u'fullname': 'Example User',
            u'admin': False,
            u'projects': [],
            u'completed-registration': True,  # because user can work
            u'invited-at': date,
            u'invitation-code': 'THE_CODE',
            u'links': {
                u'send-invite': '/v1/users/42/send-invite',
                u'ssh-keys': '/v1/users/42/ssh-keys/',
            }
        }

        self.mox.ReplayAll()
        with self.app.test_request_context():
            self.install_fake_auth()
            data = users.user_to_view(user, invite, send_code=True)
        self.assertEquals(data, expected)
예제 #33
0
    def test_user_to_view_with_my_projects(self):
        tenant = doubles.make(self.mox, doubles.Tenant,
                              id='PID', name='ptest')
        user = doubles.make(self.mox, doubles.User,
                            id=u'42', name=u'iv', email=u'*****@*****.**',
                            fullname=u'Example User', enabled=True)

        user.list_roles().AndReturn(self.roles)
        self.fake_client_set.identity_public.tenants.list()\
                .AndReturn([tenant])

        expected_projects = [{
            u'id': 'PID',
            u'name': 'ptest',
            u'href': '/v1/projects/PID'
        }]
        self.mox.ReplayAll()

        with self.app.test_request_context():
            self.install_fake_auth()
            flask.g.my_projects = True
            data = users.user_to_view(user)
        self.assertEquals(data['projects'], expected_projects)
예제 #34
0
def get_user_by_code(code):
    invite, user = _invite_and_user(code)
    return make_json_response(user_to_view(user, invite))
예제 #35
0
파일: invites.py 프로젝트: altai/altai-api
def get_user_by_code(code):
    invite, user = _invite_and_user(code)
    return make_json_response(user_to_view(user, invite))