2015-04-04 18:10:39 +00:00
|
|
|
from django.utils.translation import ugettext_lazy as _
|
2014-09-30 09:49:07 +00:00
|
|
|
|
2015-05-04 19:52:53 +00:00
|
|
|
from orchestra.contrib.settings import Setting
|
2015-04-26 13:53:00 +00:00
|
|
|
|
2014-09-30 09:49:07 +00:00
|
|
|
|
2015-04-27 14:54:17 +00:00
|
|
|
_names = ('user', 'username')
|
|
|
|
_backend_names = _names + ('group', 'shell', 'mainuser', 'home', 'base_home')
|
|
|
|
|
|
|
|
|
|
|
|
SYSTEMUSERS_SHELLS = Setting('SYSTEMUSERS_SHELLS',
|
|
|
|
(
|
2015-04-27 12:24:17 +00:00
|
|
|
('/dev/null', _("No shell, FTP only")),
|
|
|
|
('/bin/rssh', _("No shell, SFTP/RSYNC only")),
|
|
|
|
('/bin/bash', "/bin/bash"),
|
|
|
|
('/bin/sh', "/bin/sh"),
|
|
|
|
),
|
|
|
|
validators=[Setting.validate_choices]
|
|
|
|
)
|
2014-09-30 09:49:07 +00:00
|
|
|
|
2014-11-14 14:38:06 +00:00
|
|
|
|
2015-04-27 14:54:17 +00:00
|
|
|
SYSTEMUSERS_DEFAULT_SHELL = Setting('SYSTEMUSERS_DEFAULT_SHELL',
|
|
|
|
'/dev/null',
|
2015-04-26 13:53:00 +00:00
|
|
|
choices=SYSTEMUSERS_SHELLS
|
2015-03-31 12:39:08 +00:00
|
|
|
)
|
2014-10-01 16:42:40 +00:00
|
|
|
|
|
|
|
|
2015-04-27 12:24:17 +00:00
|
|
|
SYSTEMUSERS_DISABLED_SHELLS = Setting('SYSTEMUSERS_DISABLED_SHELLS',
|
|
|
|
default=(
|
|
|
|
'/dev/null',
|
|
|
|
'/bin/rssh',
|
|
|
|
),
|
|
|
|
)
|
2014-11-14 14:38:06 +00:00
|
|
|
|
|
|
|
|
2015-04-26 13:53:00 +00:00
|
|
|
SYSTEMUSERS_HOME = Setting('SYSTEMUSERS_HOME',
|
2015-04-27 14:54:17 +00:00
|
|
|
'/home/%(user)s',
|
|
|
|
help_text="Available fromat names: <tt>%s</tt>" % ', '.join(_names),
|
|
|
|
validators=[Setting.string_format_validator(_names)],
|
2015-03-31 12:39:08 +00:00
|
|
|
)
|
2014-10-01 16:42:40 +00:00
|
|
|
|
|
|
|
|
2015-04-26 13:53:00 +00:00
|
|
|
SYSTEMUSERS_FTP_LOG_PATH = Setting('SYSTEMUSERS_FTP_LOG_PATH',
|
2015-03-31 12:39:08 +00:00
|
|
|
'/var/log/vsftpd.log'
|
|
|
|
)
|
2014-10-24 14:19:34 +00:00
|
|
|
|
|
|
|
|
2015-04-26 13:53:00 +00:00
|
|
|
SYSTEMUSERS_MAIL_LOG_PATH = Setting('SYSTEMUSERS_MAIL_LOG_PATH',
|
2015-04-07 15:14:49 +00:00
|
|
|
'/var/log/exim4/mainlog'
|
|
|
|
)
|
|
|
|
|
2015-04-26 13:53:00 +00:00
|
|
|
SYSTEMUSERS_DEFAULT_GROUP_MEMBERS = Setting('SYSTEMUSERS_DEFAULT_GROUP_MEMBERS',
|
2015-03-31 12:39:08 +00:00
|
|
|
('www-data',)
|
|
|
|
)
|
2015-04-09 14:32:10 +00:00
|
|
|
|
|
|
|
|
2015-04-26 13:53:00 +00:00
|
|
|
SYSTEMUSERS_MOVE_ON_DELETE_PATH = Setting('SYSTEMUSERS_MOVE_ON_DELETE_PATH',
|
2015-04-27 14:54:17 +00:00
|
|
|
'',
|
|
|
|
help_text="Available fromat names: <tt>%s</tt>" % ', '.join(_backend_names),
|
|
|
|
validators=[Setting.string_format_validator(_backend_names)],
|
2015-04-09 14:32:10 +00:00
|
|
|
)
|
2015-05-11 14:05:39 +00:00
|
|
|
|
|
|
|
|
|
|
|
SYSTEMUSERS_EXLUDE_ACL_PATHS = Setting('SYSTEMUSERS_EXLUDE_ACL_PATHS',
|
|
|
|
(),
|
|
|
|
help_text=("Relative to user's home.<br>"
|
|
|
|
"e.g. ('logs', 'logs/apache*', 'webapps')"),
|
|
|
|
)
|