this is just for saving some thoughts
meta
- We should may be use a prefix for moins meta keys. For those keys we are responsible (key, value, type).
- e.g. moin-usergroup
- We should may be also add a prefix for keys where the value is not changeable by the user.
- edit_log_addr is set by the software
- e.g. !moin-edit_log_addr
Currently we can't prefix name and mimetype. Also not all meta keys are defined in items, e.g. sha1. All Systempages needs to be changed too at the time we do this.
diff -r 171e17d77b8f MoinMoin/items/__init__.py --- a/MoinMoin/items/__init__.py Sat Sep 25 16:58:33 2010 +0200 +++ b/MoinMoin/items/__init__.py Sat Sep 25 17:08:28 2010 +0200 @@ -50,36 +50,36 @@ ROWS_META = 10 NAME = "name" -NAME_OLD = "name_old" +NAME_OLD = "!moin-name_old" # if an item is reverted, we store the revision number we used for reverting there: -REVERTED_TO = "reverted_to" +REVERTED_TO = "!moin-reverted_to" # some metadata key constants: -ACL = "acl" +ACL = "moin-acl" # This says: I am a system item -IS_SYSITEM = "is_syspage" +IS_SYSITEM = "!moin-is_syspage" # This says: original sysitem as contained in release: <release> -SYSITEM_VERSION = "syspage_version" +SYSITEM_VERSION = "!moin-syspage_version" # keys for storing group and dict information # group of user names, e.g. for ACLs: -USERGROUP = "usergroup" +USERGROUP = "moin-usergroup" # needs more precise name / use case: -SOMEDICT = "somedict" +SOMEDICT = "moin-somedict" MIMETYPE = "mimetype" -SIZE = "size" -LANGUAGE = "language" -ITEMLINKS = "itemlinks" +SIZE = "!moin-size" +LANGUAGE = "moin-language" +ITEMLINKS = "!moin-itemlinks" -EDIT_LOG_ACTION = "edit_log_action" -EDIT_LOG_ADDR = "edit_log_addr" -EDIT_LOG_HOSTNAME = "edit_log_hostname" -EDIT_LOG_USERID = "edit_log_userid" -EDIT_LOG_EXTRA = "edit_log_extra" -EDIT_LOG_COMMENT = "edit_log_comment" +EDIT_LOG_ACTION = "!moin-edit_log_action" +EDIT_LOG_ADDR = "!moin-edit_log_addr" +EDIT_LOG_HOSTNAME = "!moin-edit_log_hostname" +EDIT_LOG_USERID = "!moin-edit_log_userid" +EDIT_LOG_EXTRA = "!moin-edit_log_extra" +EDIT_LOG_COMMENT = "!moin-edit_log_comment" EDIT_LOG = [EDIT_LOG_ACTION, EDIT_LOG_ADDR, EDIT_LOG_HOSTNAME, EDIT_LOG_USERID, EDIT_LOG_EXTRA, EDIT_LOG_COMMENT]
meta can look like this afterwards
{ "!moin-edit_log_action": "SAVE", "!moin-edit_log_addr": "127.0.0.1", "!moin-edit_log_hostname": "localhost", "!moin-itemlinks": [], "mimetype": "text/x.moin.wiki", "moin-usergroup": [ "ReimarBauer" ], "name": "something", "sha1": "da39a3ee5e6b4b0d3255bfef95601890afd80709" }
tests
- some tests for checking layer violations