Question/Problem concerning default roles

General discussion of development ideas and the approaches taken in the 3.x branch of phpBB. The next feature release of phpBB 3 will be 3.2/Rhea followed by 3.3.
Forum rules
Please do not post support questions regarding installing, updating, or upgrading phpBB 3.1. If you need support for phpBB 3.1 please visit the 3.1.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 » Sat Apr 15, 2017 3:15 am

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: 124
Joined: Tue Apr 04, 2006 4:28 pm
Contact:

Re: Question/Problem concerning default roles

Post by rxu » Sat Apr 29, 2017 1:44 am

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: 694
Joined: Tue Nov 01, 2005 9:50 pm
Location: Milano (I) Frankfurt (D)
Contact:

Re: Question/Problem concerning default roles

Post by 3Di » Sat Apr 29, 2017 4:02 am

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.
Want to compensate me for my interest? Don't ask me, just do it
I'm available for custom phpBB jobs, you can PM me the details.
New: my Live Board, Extensions and Tools for phpBB - Men at works.

Post Reply