Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ability to show DEA on demand (privileges) #1036

Closed
vinayvenu opened this issue Sep 11, 2023 · 7 comments
Closed

Ability to show DEA on demand (privileges) #1036

vinayvenu opened this issue Sep 11, 2023 · 7 comments
Assignees

Comments

@vinayvenu
Copy link
Member

vinayvenu commented Sep 11, 2023

Acceptance criteria:

  • Add new Subject/Entity Type in Permissions page saying 'Transaction data on Data Entry App', Entity Type will also be 'Transaction data on Data Entry App', Privilege should be 'View/edit entities on Data Entry App'.
  • When the permissions is toggled on, 'Data Entry App' box will display, else should not display.
  • So when the permissions is toggled on, we should be able to view/edit subjects, view/edit encounters, etc. as usual.
  • @mahalakshme for all existing UserGroups, i have set the default privilege "allow" value to true for TransactionDataOnDataEntryApp. Would that be okay, or should we set them to false.?

Out of scope:

  • Permissions for viewing/editing specific entities within data entry app
@vinayvenu vinayvenu changed the title Ability to show App Designer on demand (privileges) Ability to show DEA on demand (privileges) Sep 11, 2023
@mahalakshme mahalakshme self-assigned this Sep 12, 2023
@mahalakshme mahalakshme removed their assignment Oct 17, 2023
@himeshr himeshr self-assigned this Oct 17, 2023
himeshr added a commit to avniproject/avni-models that referenced this issue Oct 19, 2023
himeshr added a commit to avniproject/avni-server that referenced this issue Oct 19, 2023
himeshr added a commit that referenced this issue Oct 19, 2023
@himeshr
Copy link
Contributor

himeshr commented Oct 19, 2023

User Group Privileges screenshot for the new 'Transaction data on Data Entry App' privilege.
Screenshot 2023-10-19 at 12 54 23 PM

@mahalakshme
Copy link
Contributor

@himeshr true is fine. But I feel in Subject/EntityType we can just have as "DataEntryApp" instead of "TransactionDataOnDataEntryApp" since Data entry app deals with only transactional data.

@ashusvnath
Copy link

@himeshr , @vinayvenu : What happens if users directly browsers to /#app ?

himeshr added a commit to avniproject/avni-models that referenced this issue Oct 19, 2023
himeshr added a commit to avniproject/avni-server that referenced this issue Oct 19, 2023
@himeshr
Copy link
Contributor

himeshr commented Oct 19, 2023

If anyone gets following error during avni_server startup,

Caused by: org.flywaydb.core.api.FlywayException: Validate failed: Migration checksum mismatch for migration 1.314
-> Applied to database : -1907637463
-> Resolved locally    : 1262654667

Then run below migration correction commands:

delete
from group_privilege
where privilege_id = (select id from privilege where entity_type = 'TransactionDataOnDataEntryApp');

delete
from privilege
where entity_type = 'TransactionDataOnDataEntryApp';

delete
from schema_version
where schema_version.script = 'V1_314__InserPrivilegeForDEA.sql'
  and schema_version.checksum = -1907637463;


delete
from schema_version
where schema_version.script = 'V1_315__InserPrivilegeForDEA.sql'
  and schema_version.checksum = -1907637463;

@himeshr
Copy link
Contributor

himeshr commented Oct 19, 2023

Added restriction to avoid #1036 (comment)

Image

@himeshr
Copy link
Contributor

himeshr commented Oct 19, 2023

@himeshr true is fine. But I feel in Subject/EntityType we can just have as "DataEntryApp" instead of "TransactionDataOnDataEntryApp" since Data entry app deals with only transactional data.

Renamed "TransactionDataOnDataEntryApp" to "DataEntryApp"

@AchalaBelokar
Copy link

permission not able to see the toggle

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

No branches or pull requests

5 participants