Changing Editable value in a callback

Hi. I am updating an existing Datatable to make is so that some users have editable capabilities while others can only vies the data. I am using auth.get_username to get users usernames that will determine capability levels. My question is how can I change the table’s editable value in a callback in order to add the conditions?

Thanks :slight_smile:

You need to use the property “editable” as output in the callback and send the False/True option according to the user capabilities level.

Output('mytable', 'editable')


if current_user == allowed:
     is_editable = True
else:
    is_editable = False


Return is_editable