mirror of
https://github.com/friendica/friendica
synced 2025-04-24 11:50:10 +00:00
Item storage: Permissions aren't stored in the items anymore (#5495)
* The permission set is now used for item permissions * Check for allow_cid, ... is superfluous. Checking for "private" is enough * We query the permissionset * Permissions are displayed correctly * Changed index * We don't store the permissions in the item table anymore * Permission fields are now deprecated * Reversed ...
This commit is contained in:
parent
830b2edc35
commit
986106a8f7
9 changed files with 117 additions and 96 deletions
|
@ -1328,17 +1328,16 @@ class DBStructure
|
|||
"mention" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "The owner of this item was mentioned in it"],
|
||||
"forum_mode" => ["type" => "tinyint unsigned", "not null" => "1", "default" => "0", "comment" => ""],
|
||||
"psid" => ["type" => "int unsigned", "relation" => ["permissionset" => "id"], "comment" => "ID of the permission set of this post"],
|
||||
// These fields will be replaced by the "psid" from above
|
||||
"allow_cid" => ["type" => "mediumtext", "comment" => "Access Control - list of allowed contact.id '<19><78>'"],
|
||||
"allow_gid" => ["type" => "mediumtext", "comment" => "Access Control - list of allowed groups"],
|
||||
"deny_cid" => ["type" => "mediumtext", "comment" => "Access Control - list of denied contact.id"],
|
||||
"deny_gid" => ["type" => "mediumtext", "comment" => "Access Control - list of denied groups"],
|
||||
// It is to be decided whether these fields belong to the user or the structure
|
||||
// It has to be decided whether these fields belong to the user or the structure
|
||||
"resource-id" => ["type" => "varchar(32)", "not null" => "1", "default" => "", "comment" => "Used to link other tables to items, it identifies the linked resource (e.g. photo) and if set must also set resource_type"],
|
||||
"event-id" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "relation" => ["event" => "id"], "comment" => "Used to link to the event.id"],
|
||||
// Could possibly be replaced by the "attach" table?
|
||||
"attach" => ["type" => "mediumtext", "comment" => "JSON structure representing attachments to this item"],
|
||||
// Deprecated fields. Will be removed in upcoming versions
|
||||
"allow_cid" => ["type" => "mediumtext", "comment" => "Deprecated"],
|
||||
"allow_gid" => ["type" => "mediumtext", "comment" => "Deprecated"],
|
||||
"deny_cid" => ["type" => "mediumtext", "comment" => "Deprecated"],
|
||||
"deny_gid" => ["type" => "mediumtext", "comment" => "Deprecated"],
|
||||
"postopts" => ["type" => "text", "comment" => "Deprecated"],
|
||||
"inform" => ["type" => "mediumtext", "comment" => "Deprecated"],
|
||||
"type" => ["type" => "varchar(20)", "comment" => "Deprecated"],
|
||||
|
@ -1392,7 +1391,7 @@ class DBStructure
|
|||
"uid_eventid" => ["uid","event-id"],
|
||||
"icid" => ["icid"],
|
||||
"iaid" => ["iaid"],
|
||||
"psid" => ["psid"],
|
||||
"psid_wall" => ["psid", "wall"],
|
||||
]
|
||||
];
|
||||
$database["item-activity"] = [
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue