Beispiel #1
0
    def test_get_pending_acl_user(self):
        """ Test the get_pending_acl_user function. """
        pending_acls = pkgdblib.get_pending_acl_user(self.session, 'pingou')
        self.assertEqual(pending_acls, [])

        create_package_acl(self.session)

        pending_acls = pkgdblib.get_pending_acl_user(self.session, 'pingou')
        self.assertEqual(len(pending_acls), 1)
        self.assertEqual(pending_acls[0]['package'], 'guake')
        self.assertEqual(pending_acls[0]['collection'], 'devel')
        self.assertEqual(pending_acls[0]['acl'], 'commit')
        self.assertEqual(pending_acls[0]['status'], 'Awaiting Review')
Beispiel #2
0
    def test_get_pending_acl_user(self):
        """ Test the get_pending_acl_user function. """
        pending_acls = pkgdblib.get_pending_acl_user(
            self.session, 'pingou')
        self.assertEqual(pending_acls, [])

        create_package_acl(self.session)

        pending_acls = pkgdblib.get_pending_acl_user(
            self.session, 'pingou')
        self.assertEqual(len(pending_acls), 1)
        self.assertEqual(pending_acls[0]['package'], 'guake')
        self.assertEqual(pending_acls[0]['collection'], 'devel')
        self.assertEqual(pending_acls[0]['acl'], 'commit')
        self.assertEqual(pending_acls[0]['status'], 'Awaiting Review')
Beispiel #3
0
def pending_acl():
    ''' List the pending acls for the user logged in. '''
    pending_acls = pkgdblib.get_pending_acl_user(SESSION,
                                                 flask.g.fas_user.username)
    return flask.render_template(
        'acl_pending.html',
        pending_acls=pending_acls,
    )
Beispiel #4
0
def pending_acl():
    ''' List the pending acls for the user logged in. '''
    pending_acls = pkgdblib.get_pending_acl_user(
        SESSION, flask.g.fas_user.username)
    return flask.render_template(
        'acl_pending.html',
        pending_acls=pending_acls,
    )