Huge code and copyright cleanup.
git-svn-id: http://svn.32rwr.info/radicale/trunk@9 74e4794c-479d-4a33-9dda-c6c359d70f12
This commit is contained in:
@@ -1,7 +1,9 @@
|
||||
# -*- coding: utf-8; indent-tabs-mode: nil; -*-
|
||||
#
|
||||
# This file is part of Radicale Server - Calendar Server
|
||||
# Copyright © 2008 The Radicale Team
|
||||
# Copyright © 2008-2009 Guillaume Ayoub
|
||||
# Copyright © 2008 Nicolas Kandel
|
||||
# Copyright © 2008 Pascal Halter
|
||||
#
|
||||
# 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
|
||||
@@ -16,6 +18,13 @@
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with Radicale. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
"""
|
||||
Users and rights management.
|
||||
|
||||
This module loads a list of users with access rights, according to the acl
|
||||
configuration.
|
||||
"""
|
||||
|
||||
from .. import config
|
||||
|
||||
_acl = __import__(config.get("acl", "type"), locals(), globals())
|
||||
|
@@ -1,7 +1,9 @@
|
||||
# -*- coding: utf-8; indent-tabs-mode: nil; -*-
|
||||
#
|
||||
# This file is part of Radicale Server - Calendar Server
|
||||
# Copyright © 2008 The Radicale Team
|
||||
# Copyright © 2008-2009 Guillaume Ayoub
|
||||
# Copyright © 2008 Nicolas Kandel
|
||||
# Copyright © 2008 Pascal Halter
|
||||
#
|
||||
# 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
|
||||
@@ -16,10 +18,14 @@
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with Radicale. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
"""
|
||||
Fake ACL.
|
||||
|
||||
Just load the default user set in configuration, with no rights management.
|
||||
"""
|
||||
|
||||
from .. import config
|
||||
|
||||
def users():
|
||||
"""
|
||||
Get the List of all Users
|
||||
"""
|
||||
return [config.get("acl", "defaultUser")]
|
||||
"""Get the list of all users."""
|
||||
return [config.get("acl", "user")]
|
||||
|
@@ -1,7 +1,9 @@
|
||||
# -*- coding: utf-8; indent-tabs-mode: nil; -*-
|
||||
#
|
||||
# This file is part of Radicale Server - Calendar Server
|
||||
# Copyright © 2008 The Radicale Team
|
||||
# Copyright © 2008-2009 Guillaume Ayoub
|
||||
# Copyright © 2008 Nicolas Kandel
|
||||
# Copyright © 2008 Pascal Halter
|
||||
#
|
||||
# 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
|
||||
@@ -16,10 +18,17 @@
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with Radicale. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
"""
|
||||
Htpasswd ACL.
|
||||
|
||||
Load the list of users according to the htpasswd configuration.
|
||||
"""
|
||||
|
||||
# TODO: Manage rights
|
||||
|
||||
from .. import config
|
||||
|
||||
def users():
|
||||
"""
|
||||
Get the List of all Users
|
||||
"""
|
||||
return [line.split(":")[0] for line in open(config.get("acl", "filename")).readlines()]
|
||||
"""Get the list of all users."""
|
||||
return [line.split(":")[0] for line
|
||||
in open(config.get("acl", "filename")).readlines()]
|
||||
|
Reference in New Issue
Block a user