If this is your first visit, check our documentation. To post, register or login.
Forums / Code Matters / Bug Reports / Admin Profiles not adding permission for sub-page of categories (product) in 1.5.1

Admin Profiles not adding permission for sub-page of categories (product) in 1.5.1

Started by ellivir on 18 Mar 2013, 1:15 PM · Views: 1,734

Results 1 to 3 of 3
18 Mar 2013, 1:15 PM
#1
ellivir avatar

ellivir

Zen Follower

Join Date:
Sep 2005
Posts:
444
Plugin Contributions:
0

Post #1 by ellivir

Hi,
we noted after installing the Image Handler that Admin Profiles (standard of 1.5.1) is not providing permission for a CUSTOM profile for the product page, in order to update product info.

There is a permission to access the products yes, and the admin user can see all categories and subcategories but ONLY WHEN clicking the product on the category page in order to open the product form, it goes to this denied.php page instead. Superuser continues to be able to edit and update the products.

After installing IH 4, their thread people said the issue has nothing to do with the thread, I've been trying to find out what could be the issue. Also replaced the file category_product_listing.php that IH4 changed to the original but it didn't solve the issue. Now I noted that the database actually have give the permission for the categories page but NOT for the product page that is not in the menu indeed.

It looks like that this got solved by adding the permission straight to the database.

INSERT INTO ourdb_prefix151.prefix151_admin_pages_to_profiles (
profile_id ,
page_key
)
VALUES (
'2', 'product'
);

Can somebody re-produce this bug for the custom profile? Basically just to add a custom profile and look if that one is able to actually edit products under categories without getting to the page "denied". At the same time the superuser should work perfectly.

I may be blond but at least I found Zen.

18 Mar 2013, 4:21 PM
#2
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,512
Plugin Contributions:
176

Post #2 by drbyte

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

18 Mar 2013, 5:10 PM
#3
ellivir avatar

ellivir

Zen Follower

Join Date:
Sep 2005
Posts:
444
Plugin Contributions:
0

Post #3 by ellivir

DrByte:

Related discussions:
http://www.zen-cart.com/showthread.php?191834-Fixed-v1-5-1-Product-types-Admin-Access
http://www.zen-cart.com/showthread.php?203785-Done-v1-6-0-PHP-Warning-Couldn-t-find-constant-in-admin_access

Yes, I have been part of the discussion in the latter link, and also got the constants away from the debug log after that. Currently the updating works because I edited the database directly but from the above "product types admin access" I'm not able to filter what should have been corrected in the code when the webshop is indeed 1.5.1 and it is not about the other products types but the general product type where the issue appears (could be of course the other ones as well but didn't test those since they are not needed).

I may be blond but at least I found Zen.