Use portfolio_role entity to display and update portfolio member info.
Previously, we were encoding the portfolio_role.user_id as part of the form data for the portfolio admin page. This was convenient because it allowed us to easily determine certain display attributes in the template. Instead, we should rely on the PortfolioRole as the source of truth for member information. This commit adds: - Portfolio.owner_role to return the PortfolioRole of the owner - explicitly passes the PortfolioRole IDs for the PPoC and current user to the template - PortfolioRole.full_name for deriving the member name
This commit is contained in:
@@ -9,8 +9,8 @@ from atst.utils.localization import translate
|
||||
|
||||
|
||||
class PermissionsForm(BaseForm):
|
||||
member = StringField()
|
||||
user_id = HiddenField()
|
||||
member_name = StringField()
|
||||
member_id = HiddenField()
|
||||
perms_app_mgmt = SelectField(
|
||||
translate("forms.new_member.app_mgmt"),
|
||||
choices=[
|
||||
|
Reference in New Issue
Block a user