Jump to content
dioma-pl

PS 1.7 Access Denied in Design->Pages as Superadmin

Recommended Posts

Prestashop 1.7.0.5

When I try to access Design -> Pages I get a warning: "Access Denied" and I'm logged in as Super Admin.

It's fresh installation. I was able to change some Pages before and suddenly I can't.

  • Like 4

Share this post


Link to post
Share on other sites

I have the same problem while testing our custom modules. They really should kill this PS 1.7 version.

It is a piece of crap. Stay away from it ...very far...

  • Like 1

Share this post


Link to post
Share on other sites

The Same problem, it's a disaster...... Prestashop version 1.7.1.2.....

Share this post


Link to post
Share on other sites

NO, it was tragic, in just one night i rebuild site..... (delete and setup). I just saved old Database to recover pages in HTML..... no other solution for me.

Share this post


Link to post
Share on other sites
My client website has only super admin then he remove all other profile.

Now he install new module with custom admin controller => "Access Denied".

Share this post


Link to post
Share on other sites

 

Hi, 
The last monday I publicated the solution for mi...I don´t know why not publicated 
Sorry for my English.
Regards

 

Hi,

Awesome. Thank you!

Could you explaing a bit more as to how exactly to change the code?

Which code file do I need to edit?

Sorry I'm new to all this!

Share this post


Link to post
Share on other sites

 

Hi, 
The last monday I publicated the solution for mi...I don´t know why not publicated 
Sorry for my English.
Regards

 

Any more suggestions? I have theese lines but they have diferent id's... still having access denied in admin...

Share this post


Link to post
Share on other sites

Hola, tengo la solución al problema "Acceso Denegado" en Diseño>Páginas

 

Antes que nada generen respaldo de la base de datos.

 

Deben ingresar a su PhpMyAdmin de su base de datos.

Posteriormente seleccionan la tabla "d_f_authorization_role"   (donde d_f es el subfijo de su base de datos, puede ser p_s o cualquiera que hayan puesto)

Luego, verifiquen que tengan las lineas de las tablas 53, 54, 55, 56 como se muestra en la imagen role_mod.jpg

Si no tienen las tablas que es lo más seguro, deben crearlas dando clic en "Insertar" en las pestañas de la parte superior, como se muestra en la imagen role_mod_2.jpg adjuntada.

 

Así deben crear las cuatro lineas:

53 ROLE_MOD_TAB_ADMINCMSCONTENT_CREATE

54 ROLE_MOD_TAB_ADMINCMSCONTENT_READ

55 ROLE_MOD_TAB_ADMINCMSCONTENT_UPDATE

56 ROLE_MOD_TAB_ADMINCMSCONTENT_DELETE

Posteriormente ingresan a su B.O, Diseño>Páginas y listo.

role_mod.jpg

role_mod_2.jpg

  • Like 1

Share this post


Link to post
Share on other sites

Hello, Same problem Grrrrrr

I tried your solution but it doesn't work!

Into my BD, I have:

16 ROLE_MOD_TAB_ADMINCMSCONTENT_CREATE

143 ROLE_MOD_TAB_ADMINCMSCONTENT_READ

270 ROLE_MOD_TAB_ADMINCMSCONTENT_UPDATE

397 ROLE_MOD_TAB_ADMINCMSCONTENT_DELETE

 

I can't add keys because duplicates elements !

Thanks for your help

Share this post


Link to post
Share on other sites
hace 36 minutos, nightsystem dijo:

Hello, Same problem Grrrrrr

I tried your solution but it doesn't work!

Into my BD, I have:

16 ROLE_MOD_TAB_ADMINCMSCONTENT_CREATE

143 ROLE_MOD_TAB_ADMINCMSCONTENT_READ

270 ROLE_MOD_TAB_ADMINCMSCONTENT_UPDATE

397 ROLE_MOD_TAB_ADMINCMSCONTENT_DELETE

 

I can't add keys because duplicates elements !

Thanks for your help

 

Hi
First of all create a backup.

After the backup, you should try to eliminate those elements and create them in the manner indicated at the top, respecting ID 53, 54, 55, 56, but first check that you do not have them occupied.

Give us a screenshot to give us an idea of what you have.

Share this post


Link to post
Share on other sites

Hi everyone,

On 18/08/2018 at 12:14 AM, Ricardo said:

Hi
First of all create a backup.

After the backup, you should try to eliminate those elements and create them in the manner indicated at the top, respecting ID 53, 54, 55, 56, but first check that you do not have them occupied.

Give us a screenshot to give us an idea of what you have.

 

As a super admin I am denied the authorization to configure my modules. All other pages seem to work but a click to configure a module give error - "you are not authorized to configure a module. I have just upgraded to ps 1.7.4..2 from 1.6.1.20.

I am just frustrated by this. I am including a snapshot of DB ps_authorization_role, please can you say what might the issue here.

 

 

2018-09-05.png

Share this post


Link to post
Share on other sites

you need add authorization_role  to your module .

Example My class:

class AdminGimExtratoController extends AdminController
 

so we need add:

ROLE_MOD_TAB_ADMINGIMEXTRATO_CREATE

ROLE_MOD_TAB_ADMINGIMEXTRATO_DELETE

ROLE_MOD_TAB_ADMINGIMEXTRATO_READ

ROLE_MOD_TAB_ADMINGIMEXTRATO_UPDATE

image.png.4ab390da71d5ae565b0fd3383e19f6f1.png

 

after on table ps_access  we need add ID's (On this case : 954,955,956,957)

image.png.f95986562c0e78628b4461a657798a21.png

And DONE !!! :D

 

  • Like 1

Share this post


Link to post
Share on other sites

I suggest you to restore 'ps_access' table from 'clean' DB.

or

Run a query on ps_access table > SQL to give access
 

INSERT INTO ps_access (id_profile, id_authorization_role) SELECT 1, id_authorization_role FROM ps_authorization_role; 

 

  • Thanks 1

Share this post


Link to post
Share on other sites

I had the some problem this would actually solve ALL 'permission denied' problems as a superadmin, so what i did:
Download the following tables from a fresh Prestashop 1.7 installation: 
ps_access
ps_authorization_role

And overwrite them with your current Prestashop install. This might end up that some modules aren't configurable, but just reinstall that module and you will be fine.

Share this post


Link to post
Share on other sites
On 9/15/2018 at 4:24 PM, dinesh badrukhiya said:

I suggest you to restore 'ps_access' table from 'clean' DB.

or

Run a query on ps_access table > SQL to give access
 


INSERT INTO ps_access (id_profile, id_authorization_role) SELECT 1, id_authorization_role FROM ps_authorization_role; 

 

 

thank you very much

 

it works for me in 1.7.4.3

Share this post


Link to post
Share on other sites

Solution by @Ricardo (https://www.prestashop.com/forums/topic/600537-ps-17-access-denied-in-design-pages-as-superadmin/#comment-2923115) does not solve it all. Once you add the entries in `PREFIX_authorization_role` table, then run the following query for `PREFIX_access` table

INSERT INTO `pso7_access` (`id_profile`, `id_authorization_role`) VALUES ('1', '53'), ('1', '54'), ('1', '55'), ('1', '56');

It worked on Prestashop 1.7.4.3

Edited by Rahil Wazir
updating
  • Like 1

Share this post


Link to post
Share on other sites
On 9/7/2018 at 8:06 PM, luisleitaoaudio said:

you need add authorization_role  to your module .

Example My class:

class AdminGimExtratoController extends AdminController
 ... /...

so we need add:

ROLE_MOD_TAB_ADMINGIMEXTRATO_CREATE

ROLE_MOD_TAB_ADMINGIMEXTRATO_DELETE

ROLE_MOD_TAB_ADMINGIMEXTRATO_READ

ROLE_MOD_TAB_ADMINGIMEXTRATO_UPDATE

..../ ...

after on table ps_access  we need add ID's (On this case : 954,955,956,957)

 

Thank youuuuu

You saved me from suicide !!!
Applied > run

Just add information: I noticed that some (many ?)  couple id_role // id_authorisation don't exist in prefix_access table
So I compared _access table listing with _authorization_role, and added losted couples in _acces table, with role n° 1 (For id_authorization correspondind to wwwADMINxxx in the other table)

It's OK now

bye
 

Edited by fredouille

Share this post


Link to post
Share on other sites
Posted (edited)

I am having same issue. I tried all of above solution. Still having issue.

Prestashop V. 1.7.5.1

I have manually added records in "_authorization_role" also added related IDs into "_access" database table.

manually added following in _authorization_role
ROLE_MOD_TAB_ADMINGIMEXTRATO_CREATE
ROLE_MOD_TAB_ADMINGIMEXTRATO_DELETE
ROLE_MOD_TAB_ADMINGIMEXTRATO_READ
ROLE_MOD_TAB_ADMINGIMEXTRATO_UPDATE


Also added their respective IDs to _access table
 

Is there any other solution/suggestion ?

Any help -> appreciated.
Thanks
 

Edited by Viral.w3nuts

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More