Hey everyone!

With the Labour Day holidays coming up, we’d like to let you know about our upcoming working hours:

Thursday, May 1st: Our team will be off during Labour Day.
Friday, May 2nd: We'll also be off for an extended holiday break.

We’ll be back on Monday, May 5th, ready to respond to all messages received during this time.

In the meantime, if you need help, feel free to:

https://www.youtube.com/@AmeliaWordPressBookingPlugin/videos

https://www.youtube.com/@wpDataTables/videos

Thank you for being so understanding, and we hope you enjoy the long weekend! 

Okay
  Public Ticket #3014875
Row/user level permissions
Closed

Comments

  • Shattv started the conversation

    I’m interested in purchasing your plugin to use for a medical website. I want to know if there’s a feature that allows for row level security and permission so that user can only view data tables and charts relevant to them. The data source will be a sql database.

  •  1,704
    Uroš replied

    Hello Shattv,

    Firstly, I would like to sincerely apologize for the delayed response as we have been experiencing an unusually high number of tickets. I am sorry that it has taken longer than usual to respond to your concern and your patience is highly appreciated.

    If I understood correctly, would you like to create a custom column that would act as "security level", and if a user who has a certain level, can see only the rows for tables/charts,  that are for that level.

    Here is an example that we made, let's say if dependency for filtering rows would be a "user role" from WordPress users.

    If I have this table:

    5458776907.png

    This is a manual table that has manually entered IDs from wp_users and roles from wp_usermeta:

    7855603551.png
    6462766399.png
    7686895681.png

    So, then I go to create an SQL query based table which will display entries based on user roles using this query:

    SELECT  new_table.id AS ID,              new_table.role AS Role,           new_table.product AS Product,           new_table.amount AS Amount
    FROM wp_wpdatatable_6 AS new_table
    JOIN wp_usermeta AS new_table_1
    ON new_table_1.user_id = %CURRENT_USER_ID%
    AND new_table_1.meta_value LIKE CONCAT('%', new_table.role, '%')
    

    When I'm logged in with user ID = 1 , I see this:

    9999185249.png

    When I'm logged in with user ID = 4, I see the same thing. And when I'm logged in as one of the subscribers, I can only see the rows where role = subscriber:

    2907856651.png

    The only difference is that as a subscriber I don't have access to the back-end, so this confirms it is working on both front and back.

    Now, I might have misunderstood you.

    If you only need to filter rows for each user, for example, for user ID 1 , only show his rows, that is much easier to do.

    We have a feature "users can see and edit only their own data".

    You can take a look at it on this page, with a video and step-by-step example.

    Let me know how that sounds, and if anything was not clear. Thanks.

    Just wanted to point out that we have a sandbox/Demo site (https://sandbox.wpdatatables.com/), that you can use to try out some of the plugin's features;

    and there is a 15-day money-back guarantee period, so if you purchase the plugin, you can safely fully test it out, and if it doesn't fit your needs you can request and receive a refund in that period.

    Kind Regards, 

    Uros Jovanovic
    uros.jovanovic@tmsproducts.io

    Rate my support

    Try our FREE mapping plugin! MapSVG - easy Google maps, interactive SVG maps, and floor plans, choropleth maps and much more - https://wordpress.org/plugins/mapsvg-lite-interactive-vector-maps/

    wpDataTables: FAQ | Facebook | Twitter | InstagramFront-end and back-end demo | Docs

    Amelia: FAQ | Facebook | Twitter | InstagramAmelia demo sites | Docs | Discord Community

    You can try wpDataTables add-ons before purchasing on these sandbox sites:

    Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables | Master-Detail Tables