project Websites / Gitlab Issue Listing Script avatar

websites/Gitlab-Issue-Listing-Script#40: Add permitted_groups option



Issue Information

Issue Type: issue
Status: closed
Reported By: btasker
Assigned To: btasker

Milestone: v0.4
Created: 23-Apr-22 10:10



Description

Currently we can control which projects a GILS instance displays by setting $permitted_projects (introduced in #13)

However, this means enumerating every project we want displayed, which isn't particularly flexible.

It'd be good to also have the option to permit an entire group/namespace (for example github-mirror) so that those can be included too



Issue Links

Toggle State Changes

Activity


assigned to @btasker

changed the description

This should be relatively simple to implement.

verified

mentioned in commit f1847a810b994251dfab3195d58e55509572d996

Commit: f1847a810b994251dfab3195d58e55509572d996 
Author: B Tasker                            
                            
Date: 2022-04-25T12:01:35.000+01:00 

Message

Add $permitted_groups config variable for websites/Gitlab-Issue-Listing-Script#40

This takes a group name (in the url-safe format) and allows projects within that group to be displayed when $enforce_explicit_limits is true.

$permitted_projects takes precedence, so if a project is listed there, it'll be displayed even if it's group isn't in $permitted_groups

+13 -0 (13 lines changed)

This is implemented (new variable is $permitted_groups), but there's currently a bit of an incongruity in terms of how things are configured.

  • permitted_groups: array of URL safe group names
  • $excluded_groups_from_homepage: array of human readable group names

Ideally, I'd like them both to take the same format.

$excluded_groups_from_homepage was introduced in [#27](/issue/websites/Gitlab-Issue-Listing-Script/27.html) which is part of the same milestone (and will be in the same release) as this, so I don't need to worry about breaking backwards compatibility.

We can't easily filter for permitted_groups based on human readable name, so I think we need to bring [#27](/issue/websites/Gitlab-Issue-Listing-Script/27.html) in line with this rather than the other way round

marked this issue as related to #27

mentioned in issue #27