Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
log = logging.getLogger("pakfire.hub")
class AuthMixin(KerberosAuthMixin):
+ # Allow users to authenticate
+ allow_users = True
+
"""
Requires a builder or user to authenticate
"""
return self.backend.builders.get_by_name(hostname)
+ # End here if users are not allowed to authenticate
+ if not self.allow_users:
+ return
+
# Return users
return self.backend.users.get_by_name(principal)
For all connections, we regularly check if we have any new build jobs, and if so,
we will send them the job.
"""
- def get_current_user(self):
- name, password = self.get_basic_auth_credentials()
- if name is None:
- return
- return self.backend.builders.auth(name, password)
+ # Don't allow users to authenticate
+ allow_users = False
@property
def builder(self):