2011-01-25 20:31:40 +01:00
|
|
|
/**
|
|
|
|
* @provides aphront-dialog-view-css
|
|
|
|
*/
|
|
|
|
|
|
|
|
.aphront-dialog-view {
|
2013-06-18 07:02:16 +02:00
|
|
|
width: 540px;
|
|
|
|
margin: 32px auto 16px;
|
2013-09-02 17:10:47 +02:00
|
|
|
border: 1px solid {$lightblueborder};
|
|
|
|
border-bottom: 1px solid {$blueborder};
|
2013-06-17 01:31:14 +02:00
|
|
|
box-shadow: 0 1px 5px rgba(0, 0, 0, 0.25),
|
|
|
|
inset 0 1px 0 rgba(255, 255, 255, 0.5);
|
|
|
|
}
|
|
|
|
|
2013-06-18 07:02:16 +02:00
|
|
|
.device-phone .aphront-dialog-view {
|
|
|
|
margin: 16px;
|
|
|
|
width: auto;
|
|
|
|
}
|
|
|
|
|
2013-06-17 01:31:14 +02:00
|
|
|
.aphront-dialog-view-standalone {
|
|
|
|
margin: auto;
|
2013-01-23 06:16:49 +01:00
|
|
|
}
|
|
|
|
|
2013-04-10 00:50:48 +02:00
|
|
|
.aphront-dialog-head .phabricator-action-header {
|
2013-09-07 18:13:55 +02:00
|
|
|
border-bottom: 1px solid {$lightblueborder};
|
2013-06-18 07:02:16 +02:00
|
|
|
padding: 4px 16px;
|
2013-01-23 06:16:49 +01:00
|
|
|
white-space: nowrap;
|
2011-01-25 20:31:40 +01:00
|
|
|
}
|
|
|
|
|
2013-04-10 00:50:48 +02:00
|
|
|
.aphront-dialog-head .phabricator-action-header
|
|
|
|
.phabricator-action-header-title {
|
|
|
|
font-size: 15px;
|
2013-09-07 18:13:55 +02:00
|
|
|
color: {$bluetext};
|
2013-08-26 20:53:11 +02:00
|
|
|
text-shadow: 0 1px 2px #fff;
|
2013-04-10 00:50:48 +02:00
|
|
|
}
|
|
|
|
|
2011-06-10 00:28:29 +02:00
|
|
|
.aphront-dialog-view-width-form {
|
2013-01-23 06:16:49 +01:00
|
|
|
width: 600px;
|
2011-06-10 00:28:29 +02:00
|
|
|
}
|
2011-01-25 20:31:40 +01:00
|
|
|
|
2012-12-11 23:01:51 +01:00
|
|
|
.aphront-dialog-view-width-full {
|
|
|
|
width: 90%;
|
|
|
|
}
|
|
|
|
|
2011-01-25 20:31:40 +01:00
|
|
|
.aphront-dialog-body {
|
|
|
|
background: #ffffff;
|
2013-06-18 07:02:16 +02:00
|
|
|
padding: 16px;
|
2011-01-25 20:31:40 +01:00
|
|
|
border: none;
|
|
|
|
}
|
|
|
|
|
|
|
|
.aphront-dialog-tail {
|
|
|
|
border: none;
|
2013-09-02 22:57:48 +02:00
|
|
|
background: {$lightgreybackground};
|
2013-06-18 07:02:16 +02:00
|
|
|
padding: 8px 16px;
|
2013-01-23 06:16:49 +01:00
|
|
|
border-top: 1px solid #d4dadf;
|
2013-06-17 01:31:14 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
.aphront-dialog-foot {
|
2013-06-18 07:02:16 +02:00
|
|
|
padding: 6px 0;
|
|
|
|
float: left;
|
2011-01-25 20:31:40 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
.aphront-dialog-tail button,
|
|
|
|
.aphront-dialog-tail a.button {
|
|
|
|
float: right;
|
2013-08-26 20:53:11 +02:00
|
|
|
margin-left: 8px;
|
2011-01-25 20:31:40 +01:00
|
|
|
}
|
|
|
|
|
2011-02-02 00:52:04 +01:00
|
|
|
.jx-client-dialog {
|
|
|
|
position: absolute;
|
2012-12-11 23:01:51 +01:00
|
|
|
width: 100%;
|
2011-02-02 00:52:04 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
.jx-mask {
|
2013-08-26 20:53:11 +02:00
|
|
|
opacity: .75;
|
|
|
|
background: #fff;
|
|
|
|
position: fixed;
|
|
|
|
top: 0;
|
|
|
|
left: 0;
|
|
|
|
right: 0;
|
|
|
|
bottom: 0;
|
2012-10-23 20:39:33 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
.jx-dark-mask {
|
|
|
|
background: #000000;
|
|
|
|
opacity: 0.9;
|
2011-02-02 00:52:04 +01:00
|
|
|
}
|
2011-02-17 23:32:01 +01:00
|
|
|
|
|
|
|
.aphront-exception-dialog {
|
|
|
|
width: 95%;
|
|
|
|
}
|
|
|
|
|
2011-08-17 23:29:53 +02:00
|
|
|
.aphront-exception-dialog .exception-message {
|
|
|
|
font-size: 14px;
|
|
|
|
background: #efefef;
|
|
|
|
padding: 1em;
|
2012-04-09 00:07:34 +02:00
|
|
|
white-space: pre-wrap;
|
2011-08-17 23:29:53 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
.aphront-exception-dialog .exception-trace {
|
2013-01-23 20:08:27 +01:00
|
|
|
margin-top: 15px;
|
2011-08-17 23:29:53 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
.aphront-exception-dialog .exception-trace-header {
|
|
|
|
font-size: 11px;
|
2013-09-02 17:08:54 +02:00
|
|
|
color: {$greytext};
|
2011-08-17 23:29:53 +02:00
|
|
|
border-bottom: 1px solid #aaaaaa;
|
|
|
|
padding-bottom: .5em;
|
|
|
|
margin-bottom: .5em;
|
|
|
|
}
|
Add basic per-object privacy policies
Summary:
Provides a basic start for access policies. Objects expose various capabilities, like CAN_VIEW, CAN_EDIT, etc., and set a policy for each capability. We currently implement three policies, PUBLIC (anyone, including logged-out), USERS (any logged-in) and NOONE (nobody). There's also a way to provide automatic capability grants (e.g., the owner of an object can always see it, even if some capability is set to "NOONE"), but I'm not sure how great the implementation feels and it might change.
Most of the code here is providing a primitive for efficient policy-aware list queries. The problem with doing queries naively is that you have to do crazy amounts of filtering, e.g. to show the user page 6, you need to filter at least 600 objects (and likely more) before you can figure out which ones are 500-600 for them. You can't just do "LIMIT 500, 100" because that might have only 50 results, or no results. Instead, the query looks like "WHERE id > last_visible_id", and then we fetch additional pages as necessary to satisfy the request.
The general idea is that we move all data access to Query classes and have them do object filtering. The ID paging primitive allows efficient paging in most cases, and the executeOne() method provides a concise way to do policy checks for edit/view screens.
We'll probably end up with mostly broader policy UIs or configuration-based policies, but there are at least a few cases for per-object privacy (e.g., marking tasks as "Security", and restricting things to the members of projects) so I figured we'd start with a flexible primitive and the simplify it in the UI where we can.
Test Plan: Unit tests, played around in the UI with various policy settings.
Reviewers: btrahan, vrana, jungejason
Reviewed By: btrahan
CC: aran
Maniphest Tasks: T603
Differential Revision: https://secure.phabricator.com/D2210
2012-04-14 19:13:29 +02:00
|
|
|
|
|
|
|
.aphront-access-dialog {
|
|
|
|
width: 50%;
|
|
|
|
}
|