Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
U
unity_webapp
Manage
Activity
Members
Labels
Plan
Wiki
Custom issue tracker
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
project
unity_webapp
Commits
9efc8893
Commit
9efc8893
authored
12 years ago
by
Sebastian Paul
Browse files
Options
Downloads
Patches
Plain Diff
add permissions
parent
7c54ac58
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
README.txt
+3
-1
3 additions, 1 deletion
README.txt
unity_webapp.module
+16
-0
16 additions, 0 deletions
unity_webapp.module
with
19 additions
and
1 deletion
README.txt
+
3
−
1
View file @
9efc8893
...
...
@@ -17,8 +17,10 @@ http://www.omgubuntu.co.uk/2012/07/how-to-install-ubuntus-new-web-apps-feature
-- INSTALLATION --
Install as usual, see http://drupal.org/node/70151 for further information.
1.
Install as usual, see http://drupal.org/node/70151 for further information.
2. After install make shure to set permissions for users that should have access.
admin/people/permissions%23module-unity_webapp
-- CONFIGURATION --
...
...
This diff is collapsed.
Click to expand it.
unity_webapp.module
+
16
−
0
View file @
9efc8893
...
...
@@ -22,6 +22,9 @@ function unity_webapp_generate_links_array() {
* Insert Javascript into the page.
*/
function
unity_webapp_page_alter
(
&
$page
)
{
if
(
!
user_access
(
'access unity webapp'
))
{
return
;
}
global
$base_root
;
$urlparse
=
parse_url
(
$_SERVER
[
'HTTP_HOST'
]);
if
(
isset
(
$urlparse
[
'host'
]))
{
...
...
@@ -45,3 +48,16 @@ function unity_webapp_page_alter(&$page) {
// TODO: drupal_alter to allow other modules to alter the output.
drupal_add_js
(
array
(
'unity_api'
=>
$my_settings
),
'setting'
);
}
/**
* Implements hook_permission().
*
*/
function
unity_webapp_permission
()
{
return
array
(
'access unity webapp'
=>
array
(
'title'
=>
t
(
'Access unity webapp'
),
'description'
=>
t
(
'Access unity webapp.'
),
),
);
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment