mirror of
https://github.com/Kozea/Radicale.git
synced 2025-08-28 19:40:54 +00:00
Test rights management
This commit is contained in:
parent
5ce2c62402
commit
3e715a9aff
2 changed files with 166 additions and 0 deletions
27
radicale/tests/custom/rights.py
Normal file
27
radicale/tests/custom/rights.py
Normal file
|
@ -0,0 +1,27 @@
|
|||
# This file is part of Radicale Server - Calendar Server
|
||||
# Copyright (C) 2017 Unrud <unrud@openaliasbox.org>
|
||||
#
|
||||
# This library is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This library is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with Radicale. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
"""
|
||||
Custom rights management.
|
||||
|
||||
"""
|
||||
|
||||
from radicale import rights
|
||||
|
||||
|
||||
class Rights(rights.BaseRights):
|
||||
def authorized(self, user, path, permission):
|
||||
return path.strip("/") in ("tmp", "other")
|
Loading…
Add table
Add a link
Reference in a new issue