forked from Telodendria/Telodendria
[ADD/WIP] Start thinking AS, fix population
Visibility was all over the place....
This commit is contained in:
parent
01d170ce39
commit
78dbe5ca81
6 changed files with 11 additions and 3 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -17,3 +17,4 @@ src/Schema
|
|||
src/include/Schema
|
||||
man/mandoc.db
|
||||
*swp
|
||||
.ccls-cache
|
||||
|
|
|
@ -14,6 +14,8 @@ administrator API; the regular Matrix API is unaffected.
|
|||
registration tokens.
|
||||
- **CONFIG:** Allows a user to modify the Telodendria server daemon's
|
||||
configuration.
|
||||
- **APPSERVICE:** Allows a user to register and manage application
|
||||
services.
|
||||
- **GRANT_PRIVILEGES:** Allows a user to modify his or her own
|
||||
privileges or the privileges of other local users.
|
||||
- **ALIAS:** Allows a user to modify and see room aliases created by
|
||||
|
|
|
@ -303,7 +303,7 @@ RoomEventFetch(Room *room, char *id)
|
|||
JsonValueFree(HashMapSet(
|
||||
unsign,
|
||||
"pdu_status",
|
||||
JsonValueDuplicate(HashMapGet(DbJson(event_ref), "pdu_status"))
|
||||
JsonValueDuplicate(HashMapGet(DbJson(event_ref), "status"))
|
||||
));
|
||||
ts = JsonValueAsInteger(HashMapGet(ret, "origin_server_ts"));
|
||||
JsonValueFree(HashMapSet(
|
||||
|
|
|
@ -170,7 +170,7 @@ RoomPopulate(Room *room, User *user, RoomCreateRequest *req, ServerPart s)
|
|||
content = HashMapCreate(); \
|
||||
JsonSet( \
|
||||
content, \
|
||||
JsonValueString(join_rules_preset) \
|
||||
JsonValueString(p##_preset) \
|
||||
, 1, a); \
|
||||
event = RoomEventCreate( \
|
||||
sender_str, \
|
||||
|
|
|
@ -879,6 +879,10 @@ UserDecodePrivilege(const char *p)
|
|||
{
|
||||
return USER_CONFIG;
|
||||
}
|
||||
else if (StrEquals(p, "APPSERVICE"))
|
||||
{
|
||||
return USER_APPSERVICE;
|
||||
}
|
||||
else if (StrEquals(p, "GRANT_PRIVILEGES"))
|
||||
{
|
||||
return USER_GRANT_PRIVILEGES;
|
||||
|
|
|
@ -66,7 +66,8 @@ typedef enum UserPrivileges
|
|||
USER_GRANT_PRIVILEGES = (1 << 3),
|
||||
USER_PROC_CONTROL = (1 << 4),
|
||||
USER_ALIAS = (1 << 5),
|
||||
USER_ALL = ((1 << 6) - 1)
|
||||
USER_APPSERVICE = (1 << 6),
|
||||
USER_ALL = ((1 << 7) - 1)
|
||||
} UserPrivileges;
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue