mirror of
https://github.com/spalencsar/bearhub.git
synced 2026-07-06 22:54:16 +02:00
[api] refactoring: caching directory for root user is now /var/cache/bauh
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import os
|
||||
from typing import Optional
|
||||
|
||||
|
||||
def is_root():
|
||||
return os.getuid() == 0
|
||||
def is_root(user_id: Optional[int] = None):
|
||||
return user_id == 0 if user_id is not None else os.getuid() == 0
|
||||
|
||||
Reference in New Issue
Block a user