Skip to content
This repository has been archived by the owner on Nov 13, 2023. It is now read-only.

[Appstore] No Error message if PERMISSION.json file not present for app #142

Open
bs-jokri opened this issue Dec 5, 2019 · 6 comments
Open
Labels
app store all issues related to the app store enhancement New feature or request good first issue Good for newcomers

Comments

@bs-jokri
Copy link
Contributor

bs-jokri commented Dec 5, 2019

The new consent management feature (#113) introduces a new dialogue to provide certain rights to an app prior installing an app. The rights are configured in a PERMISSION.json file stored beside the actual app image in an hawkbit instance.

If the PERMISSIONS.json file is not present the user will see an error message saying the PERMISSION.json file is missing. It would be better to not show an error message if the file is not present.

@bs-jokri
Copy link
Contributor Author

bs-jokri commented Dec 5, 2019

@trademkose do you see an easy way to suppress the dialogue in case the file is not available?

@bs-jokri bs-jokri added enhancement New feature or request good first issue Good for newcomers app store all issues related to the app store labels Dec 5, 2019
@rohoet
Copy link

rohoet commented Dec 5, 2019

Just as an idea: There could also be a message saying "No permission restriction" in case no PERMISSIONS.json is available, and e.g. Permissions restricted according to PERMISSIONS.json if the file is available. Currently, if the file is not available, a very prominent red error-like message is shown, which looks a little too odd.

@bs-jokri
Copy link
Contributor Author

bs-jokri commented Dec 5, 2019

@rohoet Actually, this is the other way arround. The PERMISSIONS.json defines what an app requires to access on vehicle side. Thus, the dialogue would say something like "No permissions required". However, I still prefer to not show anything in case the file is not available as it is just an undefined state and we cannot say whether there are no restrictions ore there are restrictions but the file was not uploaded.

@trademkose
Copy link
Contributor

I think every single application has to have PERMISSIONS.json file even if the application doesn't require permission.
If the application doesn't require any permission, the PERMISSIONS.json file's context will be empty.
So if the PERMISSIONS.json is not uploaded for the application, we will contiune to show current error message.
Consequently, We can say that the application require permissions or not.
e.g. AndroidManifest.xml file contains application permissions for Android Applications. If there is no permission on the application, you don't need to type anything to the file. But the AndroidManifest.xml file should exist.

@bs-jokri
Copy link
Contributor Author

Valid point. But then we should make sure already at the upload of an app that the file is present. Would it be possible to add a dialog to the upload that asks for the file?

@trademkose
Copy link
Contributor

@bs-jokri I have a pull request about this issue.

I have added a controller to make sure that the permission file is presented for the application. This controller works on Artifact File editor page during the uploading artifacts. If there is no permission file, the error will occur like this;

Screenshot_2019-12-13 App Edit

And then,

If you want to install the application when there is no permission file, you will see the error message also and you can not install the application.
Screenshot_2019-12-13 App-testademapp

If you added the permission file but it is empty, in this case you will see this warning message like this and you can install the application after this warning message;

empty

So the PERMISSIONS.json file is a mandatory artifact for every single application.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
app store all issues related to the app store enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

3 participants