mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-01-21 07:55:00 +00:00
ttrss: Use LDAP authentication
This commit is contained in:
parent
47a54fadd1
commit
368e64c5ca
@ -51,22 +51,24 @@ def subcommand_setup(_):
|
||||
for match in aug.match('/files' + CONFIG_FILE + '/define'):
|
||||
if aug.get(match) == 'SELF_URL_PATH':
|
||||
aug.set(match + '/value', "'http://localhost/tt-rss/'")
|
||||
elif aug.get(match) == 'PLUGINS':
|
||||
aug.set(match + '/value', "'auth_remote, note'")
|
||||
|
||||
aug.save()
|
||||
|
||||
action_utils.service_restart('tt-rss')
|
||||
action_utils.webserver_enable('50-tt-rss')
|
||||
action_utils.webserver_enable('tt-rss-plinth')
|
||||
|
||||
|
||||
def subcommand_enable(_):
|
||||
"""Enable web configuration and reload."""
|
||||
action_utils.service_enable('tt-rss')
|
||||
action_utils.webserver_enable('50-tt-rss')
|
||||
action_utils.webserver_enable('tt-rss-plinth')
|
||||
|
||||
|
||||
def subcommand_disable(_):
|
||||
"""Disable web configuration and reload."""
|
||||
action_utils.webserver_disable('50-tt-rss')
|
||||
action_utils.webserver_disable('tt-rss-plinth')
|
||||
action_utils.service_disable('tt-rss')
|
||||
|
||||
|
||||
|
||||
15
data/etc/apache2/conf-available/tt-rss-plinth.conf
Normal file
15
data/etc/apache2/conf-available/tt-rss-plinth.conf
Normal file
@ -0,0 +1,15 @@
|
||||
##
|
||||
## On all sites, provide Tiny Tiny RSS on a default path: /tt-rss
|
||||
## Allow all valid LDAP users.
|
||||
##
|
||||
Alias /tt-rss /usr/share/tt-rss/www
|
||||
|
||||
<Location /tt-rss>
|
||||
AuthType basic
|
||||
AuthName "FreedomBox Login"
|
||||
AuthBasicProvider ldap
|
||||
AuthLDAPUrl "ldap:///ou=users,dc=thisbox?uid"
|
||||
AuthLDAPGroupAttribute memberUid
|
||||
AuthLDAPGroupAttributeIsDN off
|
||||
Require valid-user
|
||||
</Location>
|
||||
@ -58,7 +58,7 @@ def init():
|
||||
|
||||
def setup(helper, old_version=None):
|
||||
"""Install and configure the module."""
|
||||
helper.install(['tt-rss', 'postgresql', 'dbconfig-pgsql', 'php5-pgsql'])
|
||||
helper.install(['tt-rss', 'postgresql', 'dbconfig-pgsql', 'php-pgsql'])
|
||||
helper.call('post', actions.superuser_run, 'ttrss', ['setup'])
|
||||
helper.call('post', service.notify_enabled, None, True)
|
||||
|
||||
@ -71,7 +71,8 @@ def get_status():
|
||||
|
||||
def is_enabled():
|
||||
"""Return whether the module is enabled."""
|
||||
return action_utils.webserver_is_enabled('50-tt-rss')
|
||||
return (action_utils.service_is_enabled('tt-rss') and
|
||||
action_utils.webserver_is_enabled('tt-rss-plinth'))
|
||||
|
||||
|
||||
def is_running():
|
||||
@ -91,6 +92,6 @@ def diagnose():
|
||||
results = []
|
||||
|
||||
results.extend(action_utils.diagnose_url_on_all(
|
||||
'https://{host}/ttrss', extra_options=['--no-check-certificate']))
|
||||
'https://{host}/tt-rss', extra_options=['--no-check-certificate']))
|
||||
|
||||
return results
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user