Commit Graph

19 Commits

Author SHA1 Message Date
Akihiro Motoki cd7c1b5110 Address RemovedInDjango40Warning (2)
django.utils.translation.ugettext(), ugettext_lazy(), ugettext_noop(),
ungettext(), and ungettext_lazy() are deprecated in favor of the
functions that they’re aliases for: django.utils.translation.gettext(),
gettext_lazy(), gettext_noop(), ngettext(), and ngettext_lazy().

https://docs.djangoproject.com/en/4.0/releases/3.0/#id3

Change-Id: I77878f84e9d10cf6a136dada81eabf4e18676250
2022-02-04 16:22:07 +09:00
YuehuiLei 87f498bee5 Drop the usage of unicode prefix from unicode strings
All strings are considered as unicode strings in python 3,
so we no longer need "u" prefix (u'...').

Co-Authored-By: Akihiro Motoki <amotoki@gmail.com>
Change-Id: I796d2fcdca066475bbf29d25cbf2aa67b2b2178b
2021-02-12 13:05:27 -06:00
Akihiro Motoki 11eb4e9d3e Fix W503 warnings
W503 line break before binary operator

Looking at the code base, it sounds okay to follow this check.

Change-Id: Id511e0104dc6de5b204021661d4a8776ca6d3658
2018-04-11 18:13:47 +09:00
Akihiro Motoki e477eafa45 django2: Replace django.core.urlresolves with django.urls
(In Django 2.0) The django.core.urlresolvers module is removed
in favor of its new location, django.urls.
It was depreacted in Django 1.10:
https://docs.djangoproject.com/en/2.0/releases/1.10/#id3

blueprint django2-support
Change-Id: I46ab5c325491274b8eaffbf848e5d80f83c2fd26
2018-02-17 01:36:48 +09:00
Qian Min Chen 6572af2a19 Remove the redundant codes
DeleteInstance action inherits from tables.DeleteAction.
The parent class has the attribute 'name = "delete"' so
we can remove the unused codes.

Change-Id: I9f312ceafbf84a79b7b7941f255a16632931d5d0
2018-01-07 05:45:18 +00:00
Gábor Antal 34a3aa0ba8 Handle log message interpolation by the logger
According to OpenStack Guideline[1], logged string message should be
interpolated by the logger.

[1]: http://docs.openstack.org/developer/oslo.i18n/guidelines.html#adding-variables-to-log-messages
Change-Id: I51f50935f1eeffe4960562d6309dfdf05814e595
Closes-Bug: #1596829
2017-03-31 20:59:16 +09:00
Ying Zuo 14ab4d1c0c Fixed inconsistent names set for BatchAction
The name of a BatchAction should be one word.

Change-Id: I5172454b23a5aab951a089f05b0f5a04e1a72ba6
Closes-bug: #1626210
2016-09-21 12:57:27 -07:00
Eddie Ramirez bc1fb4910b Server-side filtering for Identity
Implements server-side filtering in Identity->Projects

Projects (Only V3 supports server filtering)
Users (Only V3 supports server filtering)
Groups
Roles

This filtering method allows a user to filter by
several fields:
- Name
- UUID
- Enabled

Cannot implement filter by email ttps://review.openstack.org/#/c/110970/

Implements blueprint: server-side-filtering
Co-Authored-By: Daniel Castellanos <luis.daniel.castellanos@intel.com>

Change-Id: I37d6afdef84593e2779d21bec0c2f55e2794ab78
2016-09-13 10:06:27 -05:00
zhurong 7bf5cedd0c Fix attribute email doesn't exist error in group panel
Fix Group panel's user table give the attribute email doesn't exist error.

Change-Id: Ie3c5b2223b6bf44486d6b6feb84e919f1f7d6686
Closes-Bug: #1605060
2016-08-25 22:36:39 +08:00
Rob Cresswell 07d33cf462 Prevent long names breaking table layouts
Adds a word-break class that can be added to tables to prevent large
column values breaking the table shape.

Change-Id: Icca10d9c29254d176dc7f8b7c039bc19c3f52c72
Related-Bug: 1565724
Closes-Bug: 1584785
2016-08-19 09:21:33 +01:00
daniel-a-nguyen 2b846515f3 Retrieve domain scoped token
This patch supports using domain scoped tokens against keystone v3.

Use Cases:

Cloud Admin - view and manage identity resources across domains
Domain Admin - view and manage identity resources in the domain logged in
User - view identity project in the domain logged in

Regression:

Supports keystone v2 through local_settings.py configuration
Supports keystone v3 with multidomain = False
Supports keystone v3 with mulitdomain = True

Relates to https://review.openstack.org/#/c/141153/

Background on how to test is here
https://wiki.openstack.org/wiki/Horizon/DomainWorkFlow

Co-Authored-By: Brad Pokorny <Brad_Pokorny@symantec.com>
Co-Authored-By: Brian Tully <brian.tully@hp.com>
Co-Authored-By: Michael Hagedorn <mike.hagedorn@hp.com>
Co-Authored-By: woomatt <matt.wood@hp.com>

Partially Implements: blueprint domain-scoped-tokens

Closes-Bug: #1413851
Change-Id: Iaa19bfef9b0c70304ff81d083c62b218b2d02479
2016-03-08 15:17:38 -08:00
Akihiro Motoki 3f92e75861 Make "enabled" colume values display-friendly and consistent
Most boolean columes are displayed through yesno_filter
and capfirst_filter, but the changed field were not.

In addition, by using yesno_filter, the corresponding colums
are displayed with translated strings and it fixes I18N bug
at the same time.

The following columes are updated by this patch.

Identity -> Domains (enabled)
Identity -> Users (enabled)
Identity -> Groups (enabled)
Firewall -> Rules (enabled, audited)

Change-Id: I35eeed6addc8f58faa34bc990c758523e4830960
Closes-Bug: #1422074
2015-02-20 15:10:07 +09:00
utsav dusad 86b1da4203 Make Default value for Groups column translatable.
Here we are passing a default string 'False' to empty_value, which is not
translatable as we haven't used the function ugettext().
So to make it translatable we are using this function.

Closes-Bug: #1399308
Change-Id: Ie568118ad702fbbe80b4ae26fbc863524037342c
2015-02-19 14:15:46 +00:00
lin-hua-cheng 0cde6aa055 Move to hacking 0.10
Release notes:
http://git.openstack.org/cgit/openstack-dev/hacking/tag/?id=0.10.0

Per the release notes, H307, H803 and H904 has been removed.

Fix code issues with H238 and W292.

Change-Id: I747ebb64db5825bc70f1ae19c1c1f5ca2089c06d
2015-02-04 20:27:07 -08:00
Shamail Tahir e676c8dc72 Change "Add..." to "Add Users" in Group Management
The button being changed can be found under Horizon -> Identity
-> Groups -> Manage Members (when Identity API v3 is enabled
in local_settings.py).  The change was requested for UX enhancement.
Closes-Bug: 1396326

Change-Id: I544d1b28b2397731f7e2e9058388edc0c45cd15a
2015-01-13 00:13:01 +00:00
liyingjun 0d1664d6a6 Change "Modify Users" to "Manage Members"
Change "Modify Users" to "Manage Members" in the Project, Group and
Domain Panels in-row Actions. This allows us to be consistent with the
tab headings in both panels.

Change-Id: I7f99624efe623d3cb7fe5861c9cd8ceab8ca3661
Closes-bug: #1398224
2014-12-02 11:13:39 +08:00
Timur Sufiev 89ee107df8 Guard against `None` value of User.email attribute
If email was not specified during User creation (it's not required),
it will be `None`. It would be safer to guard against already existing
`None` values than to prevent creating new user with email == `None`.

Change-Id: Id81a94491918190ceae4b08cd3293250bb4ab194
Closes-Bug: #1383630
2014-10-29 08:13:54 +00:00
Doug Fish 3e97f885f8 Fix concatenation in identity related actions
Fix concatenation and pluralization issues from
Delete Groups, Remove Users, Add Users, Delete
Projects, and Delete Domains actions.

Change-Id: I7ba06a1acd720165af23a6fb475d061d2cab0e8a
partial-bug: 1307476
2014-09-25 09:37:26 -05:00
David Lyle 18e8ea810d Separating Identity Dashboard and using RBAC
Moving identity panels to their own dashboard.

RBAC is now used to determine the data to load in the identity
dashboard. Using the default policy file, a user with role member
will now be able to see their project list.

Also, adding a policy check mechanism at the panel and dashboard
level to determine which panels and dashboards the user can access.

Implements blueprint separate-identity-dash

Change-Id: I7ebfec2bf6e44899bec79d3b23c90d56a976200f
2014-08-18 16:40:56 -06:00