aboutsummaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorJoey Hess <joey@gnu.kitenet.net>2009-11-13 15:31:34 -0500
committerJoey Hess <joey@gnu.kitenet.net>2009-11-13 15:31:34 -0500
commit2bd6ebb42ce3e7a91866f6731563926b09e7806f (patch)
tree1b7c179ccff0bc1895224d4b6d659d1dc7fbe4e9 /doc
parentad303e878e65c72bf31eb676ced866be56bbee91 (diff)
downloadikiwiki-2bd6ebb42ce3e7a91866f6731563926b09e7806f.tar
ikiwiki-2bd6ebb42ce3e7a91866f6731563926b09e7806f.tar.gz
move to todo item, some thoughtS
Diffstat (limited to 'doc')
-rw-r--r--doc/ikiwiki/pagespec/attachment/discussion.mdwn3
-rw-r--r--doc/todo/avoid_attachement_ui_if_upload_not_allowed.mdwn25
2 files changed, 25 insertions, 3 deletions
diff --git a/doc/ikiwiki/pagespec/attachment/discussion.mdwn b/doc/ikiwiki/pagespec/attachment/discussion.mdwn
index 34f21f84a..373242b3f 100644
--- a/doc/ikiwiki/pagespec/attachment/discussion.mdwn
+++ b/doc/ikiwiki/pagespec/attachment/discussion.mdwn
@@ -13,6 +13,3 @@ I am interested for [[todo/mbox]] --[[DavidBremner]]
>> them. --[[DavidBremner]]
>>> Done, [[plugins/filecheck]] --[[Joey]]
-
-
-Any way to make it so an edit page doesn't offer the attachment capability unless it matches a specific user, is an admin, and/or is an allowed page? (For now, I have it on all pages, and then it prohibits after I submit based on the allowed_attachments.)
diff --git a/doc/todo/avoid_attachement_ui_if_upload_not_allowed.mdwn b/doc/todo/avoid_attachement_ui_if_upload_not_allowed.mdwn
new file mode 100644
index 000000000..487915850
--- /dev/null
+++ b/doc/todo/avoid_attachement_ui_if_upload_not_allowed.mdwn
@@ -0,0 +1,25 @@
+Any way to make it so an edit page doesn't offer the attachment capability
+unless it matches a specific user, is an admin, and/or is an allowed page?
+(For now, I have it on all pages, and then it prohibits after I submit
+based on the allowed_attachments.)
+
+> To do that, ikiwiki would have to try to match the `allowed_attachments`
+> pagespec against a sort of dummy upload to the current page. Then if it
+> failed, assume all real uploads would fail. Now consider a pagespec like
+> "user(joey) and mimetype(audio/mpeg)" -- it'd be hard to make a dummy
+> upload to test this pagespec against.
+>
+> So, there would need to be some sort of test mode, where terms like
+> `mimetype()` always succeed. But then consider a pagespec like
+> "user(joey) and !mimetype(video/mpeg)" -- if mimetype succeeds, this
+> fails.
+>
+> So, maybe we can instead just filter out all the pagespec terms aside
+> from `user()`, `ip()`, and `admin()`. Transforming that into just
+> "user(joey)", which would succeed in the test.
+>
+> That'd work, I guess. Pulling a pagespec apart, filtering out terms, and
+> putting it back together is nontrivial, but doable.
+>
+> Other approach would be to have a separate pagespec that explicitly
+> controlls what pages to show the attachment UI on. --[[Joey]]