Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
O
OpnSense
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kulya
OpnSense
Commits
9205427c
Commit
9205427c
authored
Nov 23, 2016
by
Franco Fichtner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
system: simplify ACL translation for #1037
parent
7526194b
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
178 additions
and
327 deletions
+178
-327
ACL.php
src/opnsense/mvc/app/models/OPNsense/Core/ACL.php
+2
-6
ACL.xml
src/opnsense/mvc/app/models/OPNsense/Core/ACL/ACL.xml
+158
-316
system_usermanager.php
src/www/system_usermanager.php
+18
-5
No files found.
src/opnsense/mvc/app/models/OPNsense/Core/ACL.php
View file @
9205427c
...
@@ -100,10 +100,6 @@ class ACL
...
@@ -100,10 +100,6 @@ class ACL
if
(
isset
(
$ACLnode
->
name
))
{
if
(
isset
(
$ACLnode
->
name
))
{
$aclPayload
=
array
();
$aclPayload
=
array
();
$aclPayload
[
'name'
]
=
(
string
)
$ACLnode
->
name
;
$aclPayload
[
'name'
]
=
(
string
)
$ACLnode
->
name
;
if
(
isset
(
$ACLnode
->
description
))
{
// rename internal tag for backward compat.
$aclPayload
[
'descr'
]
=
(
string
)
$ACLnode
->
description
;
}
if
(
isset
(
$ACLnode
->
patterns
->
pattern
))
{
if
(
isset
(
$ACLnode
->
patterns
->
pattern
))
{
// rename pattern to match for internal usage, old code did use match and
// rename pattern to match for internal usage, old code did use match and
// to avoid duplicate conversion let's do this only on input.
// to avoid duplicate conversion let's do this only on input.
...
@@ -254,8 +250,8 @@ class ACL
...
@@ -254,8 +250,8 @@ class ACL
foreach
(
$this
->
ACLtags
as
$aclKey
=>
$aclItem
)
{
foreach
(
$this
->
ACLtags
as
$aclKey
=>
$aclItem
)
{
$priv_list
[
$aclKey
]
=
array
();
$priv_list
[
$aclKey
]
=
array
();
foreach
(
$aclItem
as
$propName
=>
$propValue
)
{
foreach
(
$aclItem
as
$propName
=>
$propValue
)
{
if
(
$propName
==
'name'
||
$propName
==
'descr'
)
{
if
(
$propName
==
'name'
)
{
// translate name
and description tags
// translate name
tag
$priv_list
[
$aclKey
][
$propName
]
=
gettext
(
$propValue
);
$priv_list
[
$aclKey
][
$propName
]
=
gettext
(
$propValue
);
}
else
{
}
else
{
$priv_list
[
$aclKey
][
$propName
]
=
$propValue
;
$priv_list
[
$aclKey
][
$propName
]
=
$propValue
;
...
...
src/opnsense/mvc/app/models/OPNsense/Core/ACL/ACL.xml
View file @
9205427c
This diff is collapsed.
Click to expand it.
src/www/system_usermanager.php
View file @
9205427c
...
@@ -666,16 +666,29 @@ $( document ).ready(function() {
...
@@ -666,16 +666,29 @@ $( document ).ready(function() {
<td>
<td>
<table class="
table
table
-
hover
table
-
condensed
">
<table class="
table
table
-
hover
table
-
condensed
">
<tr>
<tr>
<td><b><?=gettext("
Inherited
From
");?></b></td>
<td><b><?=gettext("
Inherited
from
");?></b></td>
<td><b><?=gettext("
Type
");?></b></td>
<td><b><?=gettext("
Name
");?></b></td>
<td><b><?=gettext("
Name
");?></b></td>
<td><b><?=gettext("
Description
");?></b></td>
</tr>
</tr>
<?php
<?php
foreach (get_user_privdesc(
$a_user[$id]
) as
$priv
) :?>
foreach (get_user_privdesc(
$a_user[$id]
) as
$priv
) :?>
<tr>
<tr>
<td><?=!empty(
$priv['group']
) ?
$priv['group']
: ""?></td>
<td><?=!empty(
$priv['group']
) ?
$priv['group']
: ''?></td>
<td><?=
$priv['name']
?></td>
<td>
<td><?=!empty(
$priv['descr']
) ?
$priv['descr']
: ""?></td>
<?php
switch (substr(
$id
, 0, 5)) {
case 'page-':
echo gettext('GUI');
break;
case 'user-':
echo gettext('System');
break;
default:
echo gettext('Unknown');
break;
} ?>
</td>
<td><?=
$priv['name']
?></td>
</tr>
</tr>
<?php
<?php
endforeach;?>
endforeach;?>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment