Question/Problem concerning default roles

General discussion of development ideas and the approaches taken in the 3.x branch of phpBB. The current feature release of phpBB 3 is 3.3/Proteus.
Forum rules
Please do not post support questions regarding installing, updating, or upgrading phpBB 3.3.x. If you need support for phpBB 3.3.x please visit the 3.3.x Support Forum on phpbb.com.

If you have questions regarding writing extensions please post in Extension Writers Discussion to receive proper guidance from our staff and community.
Post Reply
eqsanctum
Registered User
Posts: 1
Joined: Sat Apr 15, 2017 3:12 am

Question/Problem concerning default roles

Post by eqsanctum »

So I ran into this problem: https://www.phpbb.com/community/viewtop ... #p14713706

So my question is, do I need to keep the default roles for future testing of extensions? Can removing default roles stop particular extensions from going through? Should I just ask him/her to update their code?

I ask so that I know whether or not to find out how to restore the standard roles, for now, to accommodate authors in testing. It also makes me want to ask, if standard roles are needed for testing/install/use of something, why on earth are we given the option of editing them in the first place?


The post asking the same question is here: https://www.phpbb.com/community/viewtop ... #p14714611

I was directed to post it here for further discussion. So, /discuss :D

User avatar
rxu
Registered User
Posts: 164
Joined: Tue Apr 04, 2006 4:28 pm
Contact:

Re: Question/Problem concerning default roles

Post by rxu »

A role is just a set of existing permissions, which serves to help administrator job in adjusting users/groups/forums access. Deleting the role helps nothing and doesn't delete any actual permissions.
Editing predefined roles is perfectly fine but I also don't see why there's an option to delete them. F.e. you can't delete any of the predefined groups ;)
Image

User avatar
3Di
Registered User
Posts: 951
Joined: Tue Nov 01, 2005 9:50 pm
Location: Milano 🇮🇹 Frankfurt 🇩🇪
Contact:

Re: Question/Problem concerning default roles

Post by 3Di »

rxu wrote: Sat Apr 29, 2017 1:44 am Editing predefined roles is perfectly fine but I also don't see why there's an option to delete them.
Indeed rxu, you are right.

But as long the present codebase is written this way the solution is to check if the role exists before to try and apply it, like is done here: https://github.com/paul999/mention/blob ... le.php#L27

I feel is a good practise.
🆓 Free support for our extensions also provided here: phpBB Studio
🚀 Looking for a specific feature or alternative option? We will rock you!
Please PM me only to request paid works. Thx. Want to compensate me for my interest? Donate
My development's activity º PhpStorm's proud user º Extensions, Scripts, MOD porting, Update/Upgrades

Post Reply