[gnome-software/wip/mcrha/fedora-third-party-followup] safety tile/dialog: Use GS_APP_QUIRK_DISTRO_SAFE
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software/wip/mcrha/fedora-third-party-followup] safety tile/dialog: Use GS_APP_QUIRK_DISTRO_SAFE
- Date: Wed, 22 Sep 2021 06:58:34 +0000 (UTC)
commit 735de6d172afbd5b6a9ec749b66db6c1ac37de5e
Author: Milan Crha <mcrha redhat com>
Date: Wed Sep 22 08:56:04 2021 +0200
safety tile/dialog: Use GS_APP_QUIRK_DISTRO_SAFE
It's similar as GS_APP_QUIRK_PROVENANCE, but not the same, because
the provenance quirk changes how the repos dialog works.
The GS_APP_QUIRK_PROVENANCE can be used to show the apps as being
reviewed by the distro maintainers, rather than as being provided
by a third-party repository.
src/gs-app-context-bar.c | 5 +++--
src/gs-safety-context-dialog.c | 3 ++-
2 files changed, 5 insertions(+), 3 deletions(-)
---
diff --git a/src/gs-app-context-bar.c b/src/gs-app-context-bar.c
index 7eab047a2..7f6e6865e 100644
--- a/src/gs-app-context-bar.c
+++ b/src/gs-app-context-bar.c
@@ -364,8 +364,9 @@ update_safety_tile (GsAppContextBar *self)
* FIXME: We could do better by potentially adding a ‘trusted’ state
* to indicate that something is probably safe, but isn’t sandboxed.
* See https://gitlab.gnome.org/GNOME/gnome-software/-/issues/1451 */
- if (permissions == GS_APP_PERMISSIONS_UNKNOWN &&
- gs_app_has_quirk (self->app, GS_APP_QUIRK_PROVENANCE))
+ if (permissions == GS_APP_PERMISSIONS_UNKNOWN && (
+ gs_app_has_quirk (self->app, GS_APP_QUIRK_PROVENANCE) ||
+ gs_app_has_quirk (self->app, GS_APP_QUIRK_DISTRO_SAFE)))
add_to_safety_rating (&chosen_rating, descriptions,
SAFETY_SAFE,
/* Translators: This indicates that an application has been packaged
diff --git a/src/gs-safety-context-dialog.c b/src/gs-safety-context-dialog.c
index 890543070..c2367eb24 100644
--- a/src/gs-safety-context-dialog.c
+++ b/src/gs-safety-context-dialog.c
@@ -133,7 +133,8 @@ update_permissions_list (GsSafetyContextDialog *self)
* gs-app-context-bar.c. */
if (permissions == GS_APP_PERMISSIONS_UNKNOWN) {
add_permission_row (self->permissions_list, &chosen_rating,
- !gs_app_has_quirk (self->app, GS_APP_QUIRK_PROVENANCE),
+ !gs_app_has_quirk (self->app, GS_APP_QUIRK_PROVENANCE) &&
+ !gs_app_has_quirk (self->app, GS_APP_QUIRK_DISTRO_SAFE),
GS_CONTEXT_DIALOG_ROW_IMPORTANCE_WARNING,
"channel-insecure-symbolic",
_("Provided by a third party"),
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]