error:You don't have permission to access this table

Please report bugs and any annoyances here. Kindly include all possible details: steps to reproduce, expected result, actual result, screenshots, ... etc.
Post Reply
User avatar
Marcelo Vitoria
Veteran Member
Posts: 60
Joined: 2016-10-11 12:08

error:You don't have permission to access this table

Post by Marcelo Vitoria » 2022-07-07 23:03

Hello friends

I have an app generated in Appgini 5.76 that has been in use for years

This app has a group where sellers can only view, edit or delete their own records in a table called orders.

I exported the database tables and saved in a .sql file

I opened the project in AppGini 22.14 and managed the app to be able to use the new features of the new version.

I uploaded the files in another domain, created a new database and imported the .sql file to add the records

Configured the right new domain, the app is working normally, if you enter with the admin user, but if you log in as a user of this group of sellers, it allows you to view the records of the user of this group, but when trying to view the details of the record, it give the message:

You don't have permission to access this table

Is there any other procedure to do in the database when importing from another domain to a new one?
The app generated in gini 22.14 , even creating a new record, does not allow viewing, only listing the records, being in this group where you can only view, edit or delete records being the owner.

What should I do? because in 5.76 it is in use and normal and I can't update the app.

Looking forward to any suggestions, thanks.

Marcelo Victoria.
Marcelo Vitoria
Coding since 1984 Basic Sinclair!
Clipper Summer´87 - Visual Foxpro - VB6 - PHP
AppGini 24.11 - AdminLTE
https://www.workspaceservices.com.br

User avatar
jsetzer
AppGini Super Hero
AppGini Super Hero
Posts: 1807
Joined: 2018-07-06 06:03
Location: Kiel, Germany
Contact:

Re: error:You don't have permission to access this table

Post by jsetzer » 2022-07-08 01:05

Did you use the built in CSV export/import features or did you use your SQL Tool for export/import. If first option, please check the following:

(1) Did you configure the same permissions on the new database manually or by some SQL command?

(2) On export, there is no ownership information stored in the CSV, I think. So, when importing into a different database the new records will have a new (=different) owner.

You could...
  1. ensure existence of all memberIDs of the old database (from membership_users)
  2. extract all ownership information for that given table (from membership_userrecords) using PHP and/or SQL
  3. ensure all records still have identical primary keys (in the new database table) after import and
  4. update ownership in new database according to the extracted information by using PHP and/or SQL
Kind regards,
<js />

My AppGini Blog:
https://appgini.bizzworxx.de/blog

You can help us helping you:
Please always put code fragments inside [code]...[/code] blocks for better readability

AppGini 24.10 Revision 1579 + all AppGini Helper tools

User avatar
jsetzer
AppGini Super Hero
AppGini Super Hero
Posts: 1807
Joined: 2018-07-06 06:03
Location: Kiel, Germany
Contact:

Re: error:You don't have permission to access this table

Post by jsetzer » 2022-07-08 01:14

For clarification you should check permissions on that table granted to that specific group, for example by clicking the user profile link when logged in as a user of that group.
Kind regards,
<js />

My AppGini Blog:
https://appgini.bizzworxx.de/blog

You can help us helping you:
Please always put code fragments inside [code]...[/code] blocks for better readability

AppGini 24.10 Revision 1579 + all AppGini Helper tools

AhmedBR
AppGini Super Hero
AppGini Super Hero
Posts: 327
Joined: 2013-09-19 10:23

Re: error:You don't have permission to access this table

Post by AhmedBR » 2022-07-10 18:48

Hi there,

I have the same problem with a newly generated app.
Only EDIT is the problem, unless I choose edit ALL, no editing is allowed, or get the same message:You don't have permission to access this table.

I informed appgini about it, they will look into this.
If nobody else is having this problem, might be server issue!
Not sure :roll:

Best regards,
Ahmed
AppGini 22.14 - xampp 3.3.0 - PHP 7.4.30 - Summary reports - Calendar - Mass update - Messages - AppGiniHelper

AhmedBR
AppGini Super Hero
AppGini Super Hero
Posts: 327
Joined: 2013-09-19 10:23

Re: error:You don't have permission to access this table

Post by AhmedBR » 2022-07-11 20:25

Hay, Ahmed (appgini) just found the problem. :D

NICE JOB :D

I was using `id` with ZERO fills, removing zero fill solve my problem.
Maybe you have the same issue, I am posting the solution in case anybody got the same issue.

Have a nice day everyone :D
AppGini 22.14 - xampp 3.3.0 - PHP 7.4.30 - Summary reports - Calendar - Mass update - Messages - AppGiniHelper

User avatar
Marcelo Vitoria
Veteran Member
Posts: 60
Joined: 2016-10-11 12:08

Re: error:You don't have permission to access this table

Post by Marcelo Vitoria » 2022-07-27 13:31

Hello friends

Thanks for the tips, but nothing worked.

I updated an app generated in Gini 5.76 to 22.14 and adjusting the properties of the group to view the owner's records, it doesn't allow to view the record individually, only in the list. Changing it to "ALL" the app works normally, so it's not a registry property issue, it's something else I'm not seeing. :cry:
Marcelo Vitoria
Coding since 1984 Basic Sinclair!
Clipper Summer´87 - Visual Foxpro - VB6 - PHP
AppGini 24.11 - AdminLTE
https://www.workspaceservices.com.br

AhmedBR
AppGini Super Hero
AppGini Super Hero
Posts: 327
Joined: 2013-09-19 10:23

Re: error:You don't have permission to access this table

Post by AhmedBR » 2022-07-27 14:55

Until you find a solution, give this a shot:

I have been having strange issues because of PHP version.
Check your PHP version and change to 7.4 if you can, I find this version the most stable one at the moment.
Everything I use is working with this 7.4

8.0+ up to 8.1.6 depends on the app!

Have a nice day
AppGini 22.14 - xampp 3.3.0 - PHP 7.4.30 - Summary reports - Calendar - Mass update - Messages - AppGiniHelper

Post Reply