Jump to content

PS 1.7 Access Denied in Design->Pages as Superadmin


dioma-pl

Recommended Posts

  • 1 month later...
  • 1 month later...
  • 2 weeks later...
  • 3 weeks later...

 

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!

Link to comment
Share on other sites

  • 1 month later...

 

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...

Link to comment
Share on other sites

  • 8 months later...
  • 1 month later...

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 3
Link to comment
Share on other sites

  • 5 weeks later...

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

Link to comment
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.

Link to comment
Share on other sites

  • 3 weeks later...

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

Link to comment
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
Link to comment
Share on other sites

  • 3 weeks later...

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.

Link to comment
Share on other sites

  • 3 weeks later...
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

Link to comment
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 (see edit history)
  • Like 1
Link to comment
Share on other sites

  • 3 months later...
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 (see edit history)
Link to comment
Share on other sites

  • 1 month later...

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 (see edit history)
Link to comment
Share on other sites

  • 2 months later...

The following SQL-Query adds all missing entries from ps_authorization_role into ps_access for the role 1 which is the role for the administrator.

INSERT INTO ps_access (id_profile, id_authorization_role) SELECT '1', ar.id_authorization_role FROM ps_authorization_role ar 
  LEFT JOIN ps_access a ON ar.id_authorization_role = a.id_authorization_role 
  WHERE a.id_authorization_role IS NULL

Always make a backup of your database before running this query.

Link to comment
Share on other sites

  • 9 months later...

I had this problem and I fix it by following those steps. 

upgrade to prestashop 1.7.6.4

backup first!! 
If you are not confident with databases please don't try this guide.

Those are the steps to follow:
0) backup first your database
1) check if ps_access is empty, in my case it was empty after upgrade
2) go to the table ps_authorization_role and export it as csv
3) open this file, if you use microsoft excel select "Data" > "Text to Column"
4) delete the content in column B
5) insert a column before the column A
6) add =1 in the A1 cell
7) copy this function until the end (you can click CTRL + C and then CTRL + SHIFT + arrow down using windows) and save the file as csv
😎 go to ps_authorization_role, click import and upload the file
9) insert in "Columns separated with" ; and press Go
10) check if all works fine now

Note #1: if the table ps_access isn't empty you have to import only the missing roles
Note #2: if you have other active profiles you have to repeat those steps also for the other profiles

you can see also the video tutorial

 

for more details see https://www.kuboweb.it/tutorials/prestashop-access-denied-in-back-office-after-upgrade/
 

Link to comment
Share on other sites

  • 4 months later...

Hi, I have downloaded newest prestashop and after fresh install I have access denied for some pages in BO. I have search for solutions and nothing new appeared. 

Info: Fresh install (1.7.6.7), installation without errors. All database structure mentiond above are correct. Have no idea... But men.... fresh install!!

info2: install made on subdir of domain and with SSL

 

UPDATE: I have resolved issue by updating PHP to 7.2 (from 7.0) 

Edited by Maciej Popławski (see edit history)
Link to comment
Share on other sites

Came across this problem after a module uninstall threw an error, this post took me directly to the issue, not sure why, 4 rows had been deleted in the db table ps_authorisation_role

you could see the id column went up like 1,2,3,4,5,6,7,8......50,51,52,57!

I inserted the rows by hand exactly as the post above mentions. Access Denied no more.

Great work! Thanks for this!

Link to comment
Share on other sites

  • 5 months later...
On 18/7/2018 at 13:37, Ricardo said:

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 líneas:

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 BO, Diseño> Páginas y listo.

role_mod.jpg

role_mod_2.jpg

 

 

Me solucionaste la vida hermano! Mil gracias!

Link to comment
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
×
×
  • Create New...