interface SudoModeServiceInterface (View source)

A service class responsible for activating and checking the current status of elevated permission levels via "sudo mode". This is done by checking a timestamp value in the provided session.

Methods

bool
check(Session $session)

Checks the current session to see if sudo mode was activated within the last section of lifetime allocation.

bool
activate(Session $session)

Register activated sudo mode permission in the provided session, which lasts for the configured lifetime.

int
getLifetime()

How long the sudo mode activation lasts for in minutes.

Details

bool check(Session $session)

Checks the current session to see if sudo mode was activated within the last section of lifetime allocation.

Parameters

Session $session

Return Value

bool

if sudo mode is currently active

bool activate(Session $session)

Register activated sudo mode permission in the provided session, which lasts for the configured lifetime.

Parameters

Session $session

Return Value

bool

on success

int getLifetime()

How long the sudo mode activation lasts for in minutes.

Return Value

int