Skip to content

Exceptions to banned domains checker #60

@lorenzocorallo

Description

@lorenzocorallo

/**
* checks an array of strings for domains which are not allowed in our groups
*
* @param links array of strings that may contain a link
* @returns false if the link is NOT allowed, true otherwise
*/
export async function checkForAllowedLinks(links: string[]): Promise<boolean> {
for (const url of links) {
// these websites are simply not allowed
if (BANNED_DOMAINS.some((domain) => url.includes(domain))) return false

We should add exceptions to this rule, in groups where specific links are allowed.
For example, forms.gle links should be allowed in polimijobs as application method.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions