[CDB] [forum permission] Allow viewing topics started by others

A place for Extension Authors to post and receive feedback on Extensions still in development. No Extensions within this forum should be used within a live environment!
Anti-Spam Guide
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

IMPORTANT: Extensions Development rules

IMPORTANT FOR NEEDED EVENTS!!!
If you need an event for your extension please read this for the steps to follow to request the event(s)
qarclas
Registered User
Posts: 21
Joined: Wed Jan 07, 2015 2:31 am

Re: [Dev][forum permission] Allow view topics started by others

Post by qarclas »

Is it possible to get this setup now? or is 3.1.3 a requirement?
Is there some ETA on 3.1.3 ?
brunoais
Registered User
Posts: 447
Joined: Wed Jun 18, 2008 10:50 am

Re: [Dev][forum permission] Allow view topics started by others

Post by brunoais »

The extension's not ready yet, anyway.

I think I'll change the release schedule so that I'll release an early non-safe version for interface testing and whatnot.
Also, due to rescheduling that is not my decision nor my fault, this extension won't be able to fully work on 3.1.3 due to missing events when 3.1.3 is released.
Feel free to blame the guy who has stolen the administrative username+password and forced the system to shut down.
qarclas
Registered User
Posts: 21
Joined: Wed Jan 07, 2015 2:31 am

Re: [Dev][forum permission] Allow view topics started by others

Post by qarclas »

I'm sure there has been a lot of discussion about this in the past, but why exactly isn't this a standard built-in feature?

What we need/want it for :

Have an active forum of 200+ members. When new people want to join our little group, we have them post an application.

Existing users can see/read/post to the application.
New registered users can post an application, but not read other new applications.

Is that desire really so unusual?

I also liked the other use someone mentioned, about a moderator feedback thread.
Anyone could go in there and post new topics to the mods, without every user being able to see and read them.
User avatar
Mess
Registered User
Posts: 985
Joined: Wed Jul 01, 2009 6:37 am
Name: Kim

Re: [Dev][forum permission] Allow view topics started by others

Post by Mess »

qarclas wrote:Existing users can see/read/post to the application.
New registered users can post an application, but not read other new applications.
We use it for the same. :)
brunoais
Registered User
Posts: 447
Joined: Wed Jun 18, 2008 10:50 am

Re: [Dev][forum permission] Allow view topics started by others

Post by brunoais »

Hello everyone.
Here's one update on this extension for the interested.
If you are willing to help me testing this extension then continue reading. If you are just waiting for the finished product, there's still more waiting to do.

At this point, I want to test if the installation is working as intended. This permission is not effective yet.
Here's what I need tested:
  1. Install extension.
  2. Purge extension.
Here's a grained list of things that should happen upon a correct installation:
  1. The new permission "f_read_others_topics_brunoais" is in the permission list in the DB.
  2. The new permission with the text "Can read topics started by others" is below "Can read forum" under the "actions" tab.
  3. If, after installing, the new permission is set to "yes", "Can read forum" is set to "yes" for permissions for individual users, groups and roles.
  4. A new role still named "BRUNOAIS_ROLE_READ_OTHERS_TOPICS" appears listed.
  5. A new role "BRUNOAIS_ROLE_READ_OTHERS_TOPICS" is equal to "Standard Access" except for "Can read topics started by others" which it is set to "no" on the new role.
  6. After purging the extension, the database has no traces that the extension ever existed.
All testing help you can give is very well welcome. This testing is very important to make sure that the installation and purging process works as intended on all instalations even with other extensions I may not have thought of.
Please do not test this on a real live forum. Please test this on a clone of your forum as it may fail at any point.
Please warn me here (unless a moderator states otherwise) on any bugs you find at this process based on the list above.
leschek
Registered User
Posts: 861
Joined: Tue Jul 18, 2006 12:49 pm

Re: [Dev][forum permission] Allow view topics started by others

Post by leschek »

brunoais wrote:Here's what I need tested:

Install extension.
I wasn't able to install it. I get this error:

Code: Select all

SQL ERROR [ mysql4 ]

Table 'xxx_yyyy.phpbb_acl_roles' doesn't exist [1146]

SQL

SELECT count(*) AS how_many FROM phpbb_acl_roles WHERE role_order = 1 + ( SELECT role_order FROM phpbb_acl_roles WHERE role_name = 'ROLE_FORUM_STANDARD' ) AND role_type = 'f_'

BACKTRACE

FILE: (not given by php)
LINE: (not given by php)
CALL: msg_handler()

FILE: [ROOT]/phpbb/db/driver/driver.php
LINE: 855
CALL: trigger_error()

FILE: [ROOT]/phpbb/db/driver/mysql.php
LINE: 181
CALL: phpbb\db\driver\driver->sql_error()

FILE: [ROOT]/phpbb/db/driver/factory.php
LINE: 329
CALL: phpbb\db\driver\mysql->sql_query()

FILE: [ROOT]/ext/brunoais/readOthersTopics/migrations/initial_release.php
LINE: 64
CALL: phpbb\db\driver\factory->sql_query()

FILE: (not given by php)
LINE: (not given by php)
CALL: brunoais\readOthersTopics\migrations\initial_release->make_place_for_new_role()

FILE: [ROOT]/phpbb/db/migrator.php
LINE: 517
CALL: call_user_func_array()

FILE: [ROOT]/phpbb/db/migrator.php
LINE: 463
CALL: phpbb\db\migrator->run_step()

FILE: [ROOT]/phpbb/db/migrator.php
LINE: 301
CALL: phpbb\db\migrator->process_data_step()

FILE: [ROOT]/phpbb/db/migrator.php
LINE: 181
CALL: phpbb\db\migrator->try_apply()

FILE: [ROOT]/phpbb/extension/base.php
LINE: 80
CALL: phpbb\db\migrator->update()

FILE: [ROOT]/ext/brunoais/readOthersTopics/ext.php
LINE: 52
CALL: phpbb\extension\base->enable_step()

FILE: [ROOT]/phpbb/extension/manager.php
LINE: 187
CALL: brunoais\readOthersTopics\ext->enable_step()

FILE: [ROOT]/includes/acp/acp_extensions.php
LINE: 184
CALL: phpbb\extension\manager->enable_step()

FILE: [ROOT]/includes/functions_module.php
LINE: 674
CALL: acp_extensions->main()

FILE: [ROOT]/adm/index.php
LINE: 81
CALL: p_master->load_active()
brunoais
Registered User
Posts: 447
Joined: Wed Jun 18, 2008 10:50 am

Re: [Dev][forum permission] Allow view topics started by others

Post by brunoais »

Done. That error is fixed now. Please get version 0.0.2-dev.
leschek
Registered User
Posts: 861
Joined: Tue Jul 18, 2006 12:49 pm

Re: [Dev][forum permission] Allow view topics started by others

Post by leschek »

It seems that I still have the same error:

Code: Select all

SQL ERROR [ mysql4 ]

Table 'xxx_yyy.phpbb3_roles' doesn't exist [1146]

SQL

SELECT count(*) AS how_many FROM phpbb3_acl_roles WHERE role_order = 1 + ( SELECT role_order FROM phpbb3_roles WHERE role_name = 'ROLE_FORUM_STANDARD' ) AND role_type = 'f_'

BACKTRACE

FILE: (not given by php)
LINE: (not given by php)
CALL: msg_handler()

FILE: [ROOT]/phpbb/db/driver/driver.php
LINE: 855
CALL: trigger_error()

FILE: [ROOT]/phpbb/db/driver/mysql.php
LINE: 181
CALL: phpbb\db\driver\driver->sql_error()

FILE: [ROOT]/phpbb/db/driver/factory.php
LINE: 329
CALL: phpbb\db\driver\mysql->sql_query()

FILE: [ROOT]/ext/brunoais/readOthersTopics/migrations/initial_release.php
LINE: 64
CALL: phpbb\db\driver\factory->sql_query()

FILE: (not given by php)
LINE: (not given by php)
CALL: brunoais\readOthersTopics\migrations\initial_release->make_place_for_new_role()

FILE: [ROOT]/phpbb/db/migrator.php
LINE: 517
CALL: call_user_func_array()

FILE: [ROOT]/phpbb/db/migrator.php
LINE: 463
CALL: phpbb\db\migrator->run_step()

FILE: [ROOT]/phpbb/db/migrator.php
LINE: 301
CALL: phpbb\db\migrator->process_data_step()

FILE: [ROOT]/phpbb/db/migrator.php
LINE: 181
CALL: phpbb\db\migrator->try_apply()

FILE: [ROOT]/phpbb/extension/base.php
LINE: 80
CALL: phpbb\db\migrator->update()

FILE: [ROOT]/ext/brunoais/readOthersTopics/ext.php
LINE: 52
CALL: phpbb\extension\base->enable_step()

FILE: [ROOT]/phpbb/extension/manager.php
LINE: 187
CALL: brunoais\readOthersTopics\ext->enable_step()

FILE: [ROOT]/includes/acp/acp_extensions.php
LINE: 184
CALL: phpbb\extension\manager->enable_step()

FILE: [ROOT]/includes/functions_module.php
LINE: 674
CALL: acp_extensions->main()

FILE: [ROOT]/adm/index.php
LINE: 81
CALL: p_master->load_active()
BTW: it's hard to find path where the extension should be installed so I used "Upload extension" extension.
I'm really not sure about this, but I think I read somewhere that in path shouldn't be used capital letters ext/brunoais/readOthersTopics
User avatar
david63
Registered User
Posts: 20646
Joined: Thu Dec 19, 2002 8:08 am

Re: [Dev][forum permission] Allow view topics started by others

Post by david63 »

leschek wrote:I think I read somewhere that in path shouldn't be used capital letters
That is correct - the namespace cannot have upper case characters in it
David
Remember: You only know what you know and - you don't know what you don't know!

I now no longer support any of my extensions but they will start to become available here
brunoais
Registered User
Posts: 447
Joined: Wed Jun 18, 2008 10:50 am

Re: [Dev][forum permission] Allow view topics started by others

Post by brunoais »

leschek wrote:It seems that I still have the same error:
tension should be installed so I used "Upload extension" extension.
Damn! That was fail. Try again pls. Same tag / link.
david63 wrote:
leschek wrote:I think I read somewhere that in path shouldn't be used capital letters
That is correct - the namespace cannot have upper case characters in it
Source please.
My source: https://www.phpbb.com/extensions/writing/#a-packaging
Says:
Note: Due to internal logic inside the code, vendor and extension names may ONLY contain numbers and letters. Underscores, dashes, and other characters are NOT permitted.
In which part does the name not follow that?
leschek
Registered User
Posts: 861
Joined: Tue Jul 18, 2006 12:49 pm

Re: [Dev][forum permission] Allow view topics started by others

Post by leschek »

brunoais wrote:Here's what I need tested:
Install extension.
Installed without problem
brunoais wrote:The new permission "f_read_others_topics_brunoais" is in the permission list in the DB
Yes
brunoais wrote:The new permission with the text "Can read topics started by others" is below "Can read forum" under the "actions" tab.
Yes
brunoais wrote: If, after installing, the new permission is set to "yes", "Can read forum" is set to "yes" for permissions for individual users, groups and roles.
If this mean that after set "Can read topics started by others" to Yes it should automatically set "Can read forum" to Yes, then it doesn't set "Can read forum" to Yes.
brunoais wrote:A new role still named "BRUNOAIS_ROLE_READ_OTHERS_TOPICS" appears listed.
Yes
brunoais wrote: A new role "BRUNOAIS_ROLE_READ_OTHERS_TOPICS" is equal to "Standard Access" except for "Can read topics started by others" which it is set to "no" on the new role.
They seem to be exactly the same. I checked it twice, but I'm just human...
brunoais wrote:After purging the extension, the database has no traces that the extension ever existed.
It seems so. I couldn't see permission "f_read_others_topics_brunoais" and found nothing in "ext" table. Not sure where else i should look.
brunoais
Registered User
Posts: 447
Joined: Wed Jun 18, 2008 10:50 am

Re: [Dev][forum permission] Allow view topics started by others

Post by brunoais »

leschek wrote:
brunoais wrote: A new role "BRUNOAIS_ROLE_READ_OTHERS_TOPICS" is equal to "Standard Access" except for "Can read topics started by others" which it is set to "no" on the new role.
They seem to be exactly the same. I checked it twice, but I'm just human...
Hum... This is a phpBB bug. Thanks.
https://tracker.phpbb.com/browse/PHPBB3-13544
leschek wrote:
brunoais wrote:After purging the extension, the database has no traces that the extension ever existed.
It seems so. I couldn't see permission "f_read_others_topics_brunoais" and found nothing in "ext" table. Not sure where else i should look.
All tables whose name starts with [prefix]"acl_". You will have to check based on the permission id because the permission name only exists on a single table
leschek
Registered User
Posts: 861
Joined: Tue Jul 18, 2006 12:49 pm

Re: [Dev][forum permission] Allow view topics started by others

Post by leschek »

brunoais wrote:All tables whose name starts with [prefix]"acl_". You will have to check based on the permission id because the permission name only exists on a single table
OK. If the permission ID is in column "auth_option_id" then I can't find it anywhere in DB after disabling and deleting data of the extension.
brunoais
Registered User
Posts: 447
Joined: Wed Jun 18, 2008 10:50 am

Re: [Dev][forum permission] Allow view topics started by others

Post by brunoais »

You need to see what the id is before purging.
leschek
Registered User
Posts: 861
Joined: Tue Jul 18, 2006 12:49 pm

Re: [Dev][forum permission] Allow view topics started by others

Post by leschek »

I did. I just wasn't sure if it was in right column.
I believe that on my board and in my DB is everything deleted.

Return to “Extensions in Development”