[recipes] Don't make a user's contributed recipes as readonly
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [recipes] Don't make a user's contributed recipes as readonly
- Date: Sun, 19 Feb 2017 16:52:04 +0000 (UTC)
commit 5602a864e8b054c26778603e5bc1ad8e591e11f0
Author: Matthias Clasen <mclasen redhat com>
Date: Sun Feb 19 09:49:41 2017 -0500
Don't make a user's contributed recipes as readonly
We still want to edit them, so it is possible to contribute
updates.
src/gr-recipe-store.c | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/src/gr-recipe-store.c b/src/gr-recipe-store.c
index 490993d..5b6ed50 100644
--- a/src/gr-recipe-store.c
+++ b/src/gr-recipe-store.c
@@ -346,6 +346,9 @@ load_recipes (GrRecipeStore *self,
NULL);
}
else {
+ gboolean own;
+
+ own = strcmp (author, self->user) == 0;
recipe = g_object_new (GR_TYPE_RECIPE,
"id", id,
"name", name,
@@ -366,7 +369,7 @@ load_recipes (GrRecipeStore *self,
"default-image", default_image,
"ctime", ctime,
"mtime", mtime,
- "readonly", readonly,
+ "readonly", readonly && !own,
NULL);
g_hash_table_insert (self->recipes, g_strdup (id), recipe);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]