Files
@ 15e507047bae
Branch filter:
Location: kallithea/rhodecode/tests/functional/test_admin_permissions.py - annotation
15e507047bae
1.7 KiB
text/x-python
Incorporate CSS from select2-bootstrap-css & its license information.
RhodeCode 2.2.5 included a modified version of this upstream work. We
include herein the upstream version as downloaded and incorporated using the
following commands:
(cd /tmp; \
git clone https://github.com/t0m/select2-bootstrap-css
)
cp /tmp/select2-bootstrap-css/select2-bootstrap.css rhodecode/public/js/select2/
The content used to be appended to select2.css but we now keep it in a separate
file select2-bootstrap.css . This file could be included in root.html like
select2.css but we do currently not want to use bootstrap.
The license info was incorporated from /tmp/select2-bootstrap-css/LICENSE
into our LICENSE.md file.
RhodeCode 2.2.5 included a modified version of this upstream work. We
include herein the upstream version as downloaded and incorporated using the
following commands:
(cd /tmp; \
git clone https://github.com/t0m/select2-bootstrap-css
)
cp /tmp/select2-bootstrap-css/select2-bootstrap.css rhodecode/public/js/select2/
The content used to be appended to select2.css but we now keep it in a separate
file select2-bootstrap.css . This file could be included in root.html like
select2.css but we do currently not want to use bootstrap.
The license info was incorporated from /tmp/select2-bootstrap-css/LICENSE
into our LICENSE.md file.
ffd45b185016 7486da5f0628 7486da5f0628 7486da5f0628 7486da5f0628 7486da5f0628 ffd45b185016 ffd45b185016 7486da5f0628 7486da5f0628 ffd45b185016 ffd45b185016 ffd45b185016 ffd45b185016 ffd45b185016 7486da5f0628 ffd45b185016 ffd45b185016 ffd45b185016 ffd45b185016 ffd45b185016 7486da5f0628 ffd45b185016 ffd45b185016 ffd45b185016 7486da5f0628 ffd45b185016 ffd45b185016 ffd45b185016 ffd45b185016 7486da5f0628 ffd45b185016 ffd45b185016 ffd45b185016 7486da5f0628 ffd45b185016 ffd45b185016 ffd45b185016 ffd45b185016 7486da5f0628 7486da5f0628 ffd45b185016 ffd45b185016 ffd45b185016 ffd45b185016 | from rhodecode.model.db import User, UserIpMap
from rhodecode.tests import *
class TestAdminPermissionsController(TestController):
def test_index(self):
self.log_user()
response = self.app.get(url('admin_permissions'))
# Test response...
def test_index_ips(self):
self.log_user()
response = self.app.get(url('admin_permissions_ips'))
# Test response...
response.mustcontain('All IP addresses are allowed')
def test_add_ips(self):
self.log_user()
default_user_id = User.get_default_user().user_id
response = self.app.put(url('edit_user_ips', id=default_user_id),
params=dict(new_ip='127.0.0.0/24'))
response = self.app.get(url('admin_permissions_ips'))
response.mustcontain('127.0.0.0/24')
response.mustcontain('127.0.0.0 - 127.0.0.255')
## delete
default_user_id = User.get_default_user().user_id
del_ip_id = UserIpMap.query().filter(UserIpMap.user_id ==
default_user_id).first().ip_id
response = self.app.post(url('edit_user_ips', id=default_user_id),
params=dict(_method='delete',
del_ip_id=del_ip_id))
response = self.app.get(url('admin_permissions_ips'))
response.mustcontain('All IP addresses are allowed')
response.mustcontain(no=['127.0.0.0/24'])
response.mustcontain(no=['127.0.0.0 - 127.0.0.255'])
def test_index_overview(self):
self.log_user()
response = self.app.get(url('admin_permissions_perms'))
# Test response...
|