[telepathy-gabble/telepathy-gabble-0.8] GabbleMucChannel: annotate which properties can be changed by who
Simon McVittie
simon.mcvittie at collabora.co.uk
Thu Nov 12 06:42:05 PST 2009
---
src/muc-channel.c | 19 ++++++++++++++++++-
1 files changed, 18 insertions(+), 1 deletions(-)
diff --git a/src/muc-channel.c b/src/muc-channel.c
index 4b5f861..05396ea 100644
--- a/src/muc-channel.c
+++ b/src/muc-channel.c
@@ -198,17 +198,32 @@ enum
};
const TpPropertySignature room_property_signatures[NUM_ROOM_PROPS] = {
+ /* Part of the room definition: modifiable by owners only */
{ "anonymous", G_TYPE_BOOLEAN }, /* impl: READ, WRITE */
{ "invite-only", G_TYPE_BOOLEAN }, /* impl: READ, WRITE */
{ "invite-restricted", G_TYPE_BOOLEAN }, /* impl: WRITE */
{ "moderated", G_TYPE_BOOLEAN }, /* impl: READ, WRITE */
{ "name", G_TYPE_STRING }, /* impl: READ, WRITE */
+
+ /* Part of the room definition: might be modifiable by the owner, or
+ * not at all */
{ "description", G_TYPE_STRING }, /* impl: READ, WRITE */
+
+ /* Part of the room definition: modifiable by owners only */
{ "password", G_TYPE_STRING }, /* impl: WRITE */
{ "password-required", G_TYPE_BOOLEAN }, /* impl: READ, WRITE */
{ "persistent", G_TYPE_BOOLEAN }, /* impl: READ, WRITE */
{ "private", G_TYPE_BOOLEAN }, /* impl: READ, WRITE */
+
+ /* fd.o#13157: currently assumed to be modifiable by everyone in the
+ * room (role >= VISITOR). When that bug is fixed, it will be: */
+ /* Modifiable via special <message/>s, if the user's role is high enough;
+ * "high enough" is defined by the muc#roominfo_changesubject and
+ * muc#roomconfig_changesubject settings. */
{ "subject", G_TYPE_STRING }, /* impl: READ, WRITE */
+
+ /* Special: implicitly set to "myself" and "now", respectively, by
+ * changing subject. */
{ "subject-contact", G_TYPE_UINT }, /* impl: READ */
{ "subject-timestamp", G_TYPE_UINT }, /* impl: READ */
};
@@ -1788,7 +1803,9 @@ update_permissions (GabbleMucChannel *chan)
ROOM_PROP_SUBJECT, prop_flags_add, prop_flags_rem,
changed_props_flags);
- /* Room definition */
+ /* The room properties below are part of the "room definition", so are
+ * defined by the XEP to be editable only by owners. */
+
if (priv->self_affil == AFFILIATION_OWNER)
{
prop_flags_add = TP_PROPERTY_FLAG_WRITE;
--
1.5.6.5
More information about the telepathy-commits
mailing list