PluginProbe ʕ •ᴥ•ʔ
Advanced Access Manager – Access Governance for WordPress / trunk
Advanced Access Manager – Access Governance for WordPress vtrunk
6.8.4 6.8.5 6.9.0 6.9.1 6.9.10 6.9.11 6.9.12 6.9.13 6.9.14 6.9.15 6.9.16 6.9.17 6.9.18 6.9.19 6.9.2 6.9.20 6.9.21 6.9.22 6.9.23 6.9.24 6.9.25 6.9.26 6.9.27 6.9.28 6.9.29 6.9.3 6.9.30 6.9.31 6.9.32 6.9.33 6.9.34 6.9.35 6.9.36 6.9.37 6.9.38 6.9.39 6.9.4 6.9.41 6.9.42 6.9.43 6.9.44 6.9.45 6.9.46 6.9.47 6.9.48 6.9.49 6.9.5 6.9.51 6.9.6 6.9.7 6.9.8 6.9.9 7.0.0 7.0.0-alpha.6 7.0.0-alpha.7 7.0.0-beta.1 7.0.0-rc1 7.0.0-rc2 7.0.0-rc3 7.0.1 7.0.10 7.0.11 7.0.2 7.0.3 7.0.4 7.0.5 7.0.6 7.0.7 7.0.8 7.0.9 7.1.0 7.1.1 trunk 3.0 4.0 4.0.1 4.1 4.2 4.3 4.4 4.4.1 4.5 4.6 4.6.1 4.6.2 4.7 4.7.1 4.7.2 4.7.5 4.7.6 4.8 4.8.1 4.9 4.9.1 4.9.2 4.9.3 4.9.4 4.9.5 4.9.5.1 4.9.5.2 5.0 5.0.1 5.0.2 5.0.3 5.0.4 5.0.5 5.0.6 5.0.7 5.0.8 5.1 5.1.1 5.10 5.11 5.2 5.2.1 5.2.5 5.2.6 5.2.7 5.3 5.3.1 5.3.2 5.3.3 5.3.4 5.3.5 5.4 5.4.1 5.4.2 5.4.3 5.4.3.1 5.4.3.2 5.5 5.5.1 5.5.2 5.6 5.6.1 5.6.1.1 5.7 5.7.1 5.7.2 5.7.3 5.8 5.8.1 5.8.2 5.8.3 5.9 5.9.1 5.9.1.1 5.9.2 5.9.2.1 5.9.3 5.9.4 5.9.5 5.9.6 5.9.6.1 5.9.6.2 5.9.6.3 5.9.7 5.9.7.1 5.9.7.2 5.9.7.3 5.9.8 5.9.8.1 5.9.9 5.9.9.1 6.0.0 6.0.1 6.0.2 6.0.3 6.0.4 6.0.5 6.1.0 6.1.1 6.2.0 6.2.1 6.2.2 6.3.0 6.3.1 6.3.2 6.3.3 6.4.0 6.4.1 6.4.2 6.4.3 6.5.0 6.5.1 6.5.2 6.5.3 6.5.4 6.6.0 6.6.1 6.6.2 6.6.3 6.6.4 6.7.0 6.7.1 6.7.2 6.7.3 6.7.4 6.7.5 6.7.6 6.7.7 6.7.8 6.7.9 6.8.0 6.8.1 6.8.2 6.8.3
advanced-access-manager / application / Backend / tmpl / metabox / principal-iframe.php
advanced-access-manager / application / Backend / tmpl / metabox Last commit date
iframe-footer.php 1 year ago iframe-header.php 1 year ago main-iframe.php 5 months ago policy-metabox.php 1 year ago policy-parent-metabox.php 1 year ago policy-principal-metabox.php 1 year ago post-iframe.php 1 year ago post-metabox.php 1 year ago principal-iframe.php 1 year ago user-iframe.php 1 year ago user-metabox.php 1 year ago
principal-iframe.php
140 lines
1 <?php /** @version 7.0.0 **/ ?>
2
3 <?php
4 if (defined('AAM_KEY')) {
5 wp_enqueue_style('aam-vendor', AAM_MEDIA . '/css/vendor.min.css', [], AAM_VERSION);
6 wp_enqueue_style('aam', AAM_MEDIA . '/css/aam.css', array('aam-vendor'), AAM_VERSION);
7 wp_enqueue_script('aam-iframe', AAM_MEDIA . '/js/iframe-content.js', [], AAM_VERSION);
8 }
9 ?>
10
11 <?php if (defined('AAM_KEY')) { ?>
12 <?php echo static::loadTemplate(__DIR__ . '/iframe-header.php', $params); ?>
13
14 <div class="metabox-holder main-metabox">
15 <div class="postbox" style="border: none !important">
16 <h3 class="hndle">
17 <span><?php echo __('Users & Roles', 'advanced-access-manager'); ?></span>
18 </h3>
19 <div class="inside" style="padding: 0 0 12px 0" id="policy_principle_selector">
20 <div class="aam-postbox-inside">
21 <ul class="nav nav-tabs" role="tablist">
22 <?php $active = 0; ?>
23 <?php if (current_user_can('aam_manage_roles')) { ?>
24 <li role="presentation" class="<?php echo (!$active++ ? 'active ' : ''); ?>text-center"><a href="#roles" aria-controls="roles" role="tab" data-toggle="tab"><i class="icon-users"></i><span class="aam-subject-title"><?php echo __('Roles', 'advanced-access-manager'); ?></span></a></li>
25 <?php } ?>
26 <?php if (current_user_can('aam_manage_users')) { ?>
27 <li role="presentation" class="<?php echo (!$active++ ? 'active ' : ''); ?>text-center"><a href="#users" aria-controls="users" role="tab" data-toggle="tab"><i class="icon-user"></i><span class="aam-subject-title"><?php echo __('Users', 'advanced-access-manager'); ?></span></a></li>
28 <?php } ?>
29 <?php if (current_user_can('aam_manage_visitors')) { ?>
30 <li role="presentation" class="<?php echo (!$active++ ? 'active ' : ''); ?>text-center"><a href="#visitor" aria-controls="visitor" role="tab" data-toggle="tab"><i class="icon-user-secret"></i><span class="aam-subject-title"><?php echo __('Visitor', 'advanced-access-manager'); ?></span></a></li>
31 <?php } ?>
32 <?php if (current_user_can('aam_manage_default')) { ?>
33 <li role="presentation" class="<?php echo (!$active++ ? 'active ' : ''); ?>text-center"><a href="#default" aria-controls="default" role="tab" data-toggle="tab" class="text-danger"><i class="icon-asterisk"></i><span class="aam-subject-title"><?php echo __('Default', 'advanced-access-manager'); ?></span></a></li>
34 <?php } ?>
35 <?php if ($active === 0) { ?>
36 <li role="presentation" class="active text-center"><a href="#none" aria-controls="none" role="tab" data-toggle="tab" class="text-muted"><i class="icon-asterisk"></i><span class="aam-subject-title"><?php echo __('None', 'advanced-access-manager'); ?></span></a></li>
37 <?php } ?>
38 </ul>
39 <div class="tab-content">
40 <?php $active = 0; ?>
41 <?php if (current_user_can('aam_manage_roles')) { ?>
42 <div role="tabpanel" class="tab-pane<?php echo (!$active++ ? ' active' : ''); ?>" id="roles">
43 <table id="policy_principle_role_list" class="table table-striped table-bordered">
44 <thead>
45 <tr>
46 <th>ID</th>
47 <th width="80%"><?php echo __('Role', 'advanced-access-manager'); ?></th>
48 <th><?php echo __('Apply', 'advanced-access-manager'); ?></th>
49 <th>Data</th>
50 </tr>
51 </thead>
52 <tbody></tbody>
53 </table>
54 </div>
55 <?php } ?>
56 <?php if (current_user_can('aam_manage_users')) { ?>
57 <div role="tabpanel" class="tab-pane<?php echo (!$active++ ? ' active' : ''); ?>" id="users">
58 <table id="policy_principle_user_list" class="table table-striped table-bordered">
59 <thead>
60 <tr>
61 <th>ID</th>
62 <th width="80%"><?php echo __('Username', 'advanced-access-manager'); ?></th>
63 <th><?php echo __('Apply', 'advanced-access-manager'); ?></th>
64 <th>Data</th>
65 </tr>
66 </thead>
67 <tbody></tbody>
68 </table>
69 </div>
70 <?php } ?>
71 <?php if (current_user_can('aam_manage_visitors')) { ?>
72 <div role="tabpanel" class="tab-pane<?php echo (!$active++ ? ' active' : ''); ?>" id="visitor">
73 <div class="visitor-message">
74 <span class="aam-bordered"><?php echo __('Attach current policy to visitors (any user that is not authenticated).', 'advanced-access-manager'); ?></span>
75 <?php
76 $is_attached = AAM::api()->policies('visitor')->is_attached($params->policyId);
77 $btn_status = $is_attached === true ? 'detach' : 'attach';
78 ?>
79
80 <?php if ($is_attached) { ?>
81 <button
82 class="btn btn-primary btn-block"
83 id="toggle_visitor_policy"
84 data-has="1"
85 <?php echo ($btn_status ? '' : ' disabled'); ?>
86 ><?php echo __('Detach Policy From Visitors', 'advanced-access-manager'); ?></button>
87 <?php } else { ?>
88 <button
89 class="btn btn-primary btn-block"
90 id="toggle_visitor_policy"
91 data-has="0"
92 <?php echo ($btn_status ? '' : ' disabled'); ?>
93 ><?php echo __('Attach Policy To Visitors', 'advanced-access-manager'); ?></button>
94 <?php } ?>
95 </div>
96 </div>
97 <?php } ?>
98 <?php if (current_user_can('aam_manage_default')) { ?>
99 <div role="tabpanel" class="tab-pane<?php echo (!$active++ ? ' active' : ''); ?>" id="default">
100 <div class="visitor-message">
101 <span class="aam-bordered"><?php echo __('Attach current policy to all users, roles and visitors.', 'advanced-access-manager'); ?></span>
102 <?php
103 $is_attached = AAM::api()->policies('default')->is_attached($params->policyId);
104 $btn_status = $is_attached === true ? 'detach' : 'attach';
105 ?>
106
107 <?php if ($is_attached) { ?>
108 <button
109 class="btn btn-primary btn-block"
110 id="attach-policy-default"
111 data-has="1"
112 <?php echo ($btn_status ? '' : ' disabled'); ?>
113 ><?php echo __('Detach Policy From Everyone', 'advanced-access-manager'); ?></button>
114 <?php } else { ?>
115 <button
116 class="btn btn-primary btn-block"
117 id="attach-policy-default"
118 data-has="0"
119 <?php echo ($btn_status ? '' : ' disabled'); ?>
120 ><?php echo __('Attach Policy To Everyone', 'advanced-access-manager'); ?></button>
121 <?php } ?>
122 </div>
123 </div>
124 <?php } ?>
125 <?php if ($active === 0) { ?>
126 <div role="tabpanel" class="tab-pane active" id="none">
127 <p class="alert alert-warning"><?php echo __('You are not allowed to manage any of the existing users, roles, visitors or default access settings.', 'advanced-access-manager'); ?></p>
128 </div>
129 <?php } ?>
130 </div>
131 </div>
132 </div>
133 </div>
134 </div>
135
136 <!-- Additional attributes -->
137 <input type="hidden" id="aam-policy-id" value="<?php echo intval($params->policyId); ?>" />
138
139 <?php echo static::loadTemplate(__DIR__ . '/iframe-footer.php', $params); ?>
140 <?php }