I'm tinkering with my learning/first extension.
Goal is to have spoiler tag with permissions. Who can see the content of the spoiler tag and who cannot. I don't know if this is possible yet but hey I gotta start somewhere.
In other forum run with other forum software they complain when discount codes / game giveaway codes are crawled by bots so there comes my idea for this.
I can register custom permissions just fine with code below (ignore my Label x4 - just testing and learning).
But I cannot find any way to get Everyone in to the permission dropdown like in the View forum dropdown - image below.
There might be an easy solution that is staring me right in to my eyes.
app.initializers.add('markokaartinen-spoiler-with-permissions', () => {
app.extensionData
.for('markokaartinen-spoiler-with-permissions')
.registerPermission(
{
icon: 'far fa-plus-square', // Font-Awesome Icon
label: 'Label x4', // Permission Label
permission: 'markokaartinen-spoiler-with-permissions.view', // Actual permission name stored in database (and used when checking permission).
tagScoped: true, // Whether it be possible to apply this permission on tags, not just globally. Explained in the next paragraph.
},
'view', // Category permission will be added to on the grid
);
});