summaryrefslogtreecommitdiff
path: root/core/views
diff options
context:
space:
mode:
authorBharat Mediratta <bharat@menalto.com>2008-12-01 08:50:00 +0000
committerBharat Mediratta <bharat@menalto.com>2008-12-01 08:50:00 +0000
commit91c4bda1ec6640abb8b1a585e1fd1f8955d53fd1 (patch)
tree42f8f79c6d356a04d0e8365a0921d7257f12c64d /core/views
parentab0fcb7453db7d93c9dc1dfd38e6d6f84a5b16b5 (diff)
Prototype access control model. There's much left to do, but it's a
working implementation.
Diffstat (limited to 'core/views')
-rw-r--r--core/views/welcome.html.php18
1 files changed, 11 insertions, 7 deletions
diff --git a/core/views/welcome.html.php b/core/views/welcome.html.php
index e2390e9e..1cfd6d7c 100644
--- a/core/views/welcome.html.php
+++ b/core/views/welcome.html.php
@@ -128,6 +128,11 @@
a:hover {
text-decoration: underline;
}
+
+ span.understate {
+ font-size: 70%;
+ font-style: italic;
+ }
</style>
<?= html::script("lib/jquery.js") ?>
<?= html::script("lib/jquery.cookie.js") ?>
@@ -334,15 +339,14 @@
<? $current = $album_tree[$current]; ?>
<ul>
<li>
+ <span class="understate">(<?= $current->album->id ?>)</span>
<?= html::anchor("albums/{$current->album->id}", $current->album->title) ?>
- <? foreach (ORM::factory("item")->list_fields("items") as $field => $info): ?>
- <? if (!strncmp($field, "view_", 5)): ?>
- [<?= $field ?>=<?= $current->album->$field ?>]
+ access:
+ <? if (access::can(group::EVERYBODY, "view", $current->album->id)): ?>
+ access: <?= html::anchor("welcome/deny_perm/0/view/{$current->album->id}", "yes") ?>
+ <? else: ?>
+ access: <?= html::anchor("welcome/add_perm/0/view/{$current->album->id}", "no") ?>
<? endif ?>
- <? endforeach ?>
- <? foreach (ORM::factory("access")->where("item_id", $current->album->id)->find() as $access): ?>
- [ <?= $access->id ?> ]
- <? endforeach ?>
<? $stack[] = "CLOSE"; ?>
<? if ($current->children): ?>
<? $stack = array_merge($stack, $current->children) ?>