Skip to content
23 changes: 7 additions & 16 deletions src/drunc/authoriser/dummy_authoriser.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,21 @@
from drunc.utils.utils import get_logger


# TODO: Should be communicating over network
# The Rolls Royce of the authoriser systems
class DummyAuthoriser:
def __init__(
self,
system: SystemType,
configuration_handler: DummyAuthoriserConfHandler = None,
self, configuration: DummyAuthoriserConfHandler, system: SystemType.ValueType
):
self.log = get_logger("utils.authorizer")
self.log.debug("DummyAuthoriser ready")
self.configuration = configuration_handler
self.command_actions = {} # Dict[str, ActionType]
self.configuration = configuration
self.system = system

def is_authorised(
self, token: Token, action: ActionType, system: SystemType, cmd_name: str = ""
self,
token: Token,
action: ActionType.ValueType,
system: SystemType.ValueType,
cmd_name: str,
) -> bool:
self.log.debug(
f"Authorising {token.user_name} to {ActionType.Name(action)} ({cmd_name}) on {SystemType.Name(system)}"
Expand All @@ -30,11 +29,3 @@ def is_authorised(
def authorised_actions(self, token: Token) -> list[str]:
self.log.info(f"Grabbing authorisations for {token.token}")
return []


def main():
DummyAuthoriser()


if __name__ == "__main__":
main()
Empty file removed src/drunc/broadcast/__init__.py
Empty file.
Empty file.
38 changes: 0 additions & 38 deletions src/drunc/broadcast/client/broadcast_handler.py

This file was deleted.

This file was deleted.

43 changes: 0 additions & 43 deletions src/drunc/broadcast/client/configuration.py

This file was deleted.

109 changes: 0 additions & 109 deletions src/drunc/broadcast/client/grpc_stdout_broadcast_handler.py

This file was deleted.

106 changes: 0 additions & 106 deletions src/drunc/broadcast/client/kafka_stdout_broadcast_handler.py

This file was deleted.

Empty file.
Loading
Loading