From 5a54a6da8afe379fea7d3b13a8e05d6d6d646170 Mon Sep 17 00:00:00 2001 From: boyska Date: Sat, 23 Sep 2017 20:02:06 +0200 Subject: [PATCH] excluded users can do nothing --- conf.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/conf.go b/conf.go index 70378a9..fa48ce3 100644 --- a/conf.go +++ b/conf.go @@ -214,6 +214,9 @@ func (c *Config) GetShareURL(sharename string) (url.URL, error) { // GetAuthShares returns an array of all the shares the user is authorized to use, including its home. func (c *Config) GetAuthShares(username string) []Share { shares := make([]Share, 0) + if c.Global.Excluded.Has(username) { + return shares + } for _, s := range c.Shares { if s.IsAuthorized(username) { shares = append(shares, s)