Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Gelencsér Szabolcs
/
circlestack
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
211e28fe
authored
9 years ago
by
Bach Dániel
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'feature-disable-admin' into 'master'
Feature disable admin
See merge request !291
parents
cbbcfb7b
da86e0d8
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
13 additions
and
1 deletions
+13
-1
circle/circle/settings/base.py
+2
-0
circle/circle/settings/local.py
+2
-0
circle/circle/urls.py
+6
-1
circle/dashboard/context_processors.py
+1
-0
circle/dashboard/templates/dashboard/base.html
+2
-0
No files found.
circle/circle/settings/base.py
View file @
211e28fe
...
...
@@ -559,3 +559,5 @@ MAX_NODE_RAM = get_env_variable("MAX_NODE_RAM", 1024)
# Url to download the client: (e.g. http://circlecloud.org/client/download/)
CLIENT_DOWNLOAD_URL
=
get_env_variable
(
'CLIENT_DOWNLOAD_URL'
,
'http://circlecloud.org/client/download/'
)
ADMIN_ENABLED
=
False
This diff is collapsed.
Click to expand it.
circle/circle/settings/local.py
View file @
211e28fe
...
...
@@ -113,3 +113,5 @@ if DEBUG:
PIPELINE_DISABLED_COMPILERS
=
(
'pipeline.compilers.less.LessCompiler'
,
)
ADMIN_ENABLED
=
True
This diff is collapsed.
Click to expand it.
circle/circle/urls.py
View file @
211e28fe
...
...
@@ -41,7 +41,6 @@ urlpatterns = patterns(
# url(r'^admin/doc/', include('django.contrib.admindocs.urls')),
url
(
r'^$'
,
lambda
x
:
redirect
(
reverse
(
"dashboard.index"
))),
url
(
r'^admin/'
,
include
(
admin
.
site
.
urls
)),
url
(
r'^network/'
,
include
(
'network.urls'
)),
url
(
r'^dashboard/'
,
include
(
'dashboard.urls'
)),
...
...
@@ -79,6 +78,12 @@ if 'rosetta' in settings.INSTALLED_APPS:
url
(
r'^rosetta/'
,
include
(
'rosetta.urls'
)),
)
if
settings
.
ADMIN_ENABLED
:
urlpatterns
+=
patterns
(
''
,
url
(
r'^admin/'
,
include
(
admin
.
site
.
urls
)),
)
if
get_env_variable
(
'DJANGO_SAML'
,
'FALSE'
)
==
'TRUE'
:
urlpatterns
+=
patterns
(
...
...
This diff is collapsed.
Click to expand it.
circle/dashboard/context_processors.py
View file @
211e28fe
...
...
@@ -29,4 +29,5 @@ def notifications(request):
def
extract_settings
(
request
):
return
{
'COMPANY_NAME'
:
getattr
(
settings
,
"COMPANY_NAME"
,
None
),
'ADMIN_ENABLED'
:
getattr
(
settings
,
"ADMIN_ENABLED"
,
False
),
}
This diff is collapsed.
Click to expand it.
circle/dashboard/templates/dashboard/base.html
View file @
211e28fe
...
...
@@ -20,9 +20,11 @@
{% if user.is_authenticated and user.pk and not request.token_user %}
<ul
class=
"nav navbar-nav navbar-right"
id=
"dashboard-menu"
>
{% if user.is_superuser %}
{% if ADMIN_ENABLED %}
<li>
<a
href=
"/admin/"
><i
class=
"fa fa-cogs"
></i>
{% trans "Admin" %}
</a>
</li>
{% endif %}
<li>
<a
href=
"{% url "
dashboard
.
views
.
storage
"
%}"
><i
class=
"fa fa-database"
></i>
{% trans "Storage" %}
...
...
This diff is collapsed.
Click to expand it.
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