Display error if modifying access rights for a ref is forbidden

If a user is owner of at least one ref he is able to edit the access
rights on a project. If he adds access rights for other refs, these
access rights were silently ignored on save. With this change now an
error message is displayed to inform the user that he doesn't have
permissions to do the update for these refs.

In case of such an error the project access screen stays in the edit
mode so that the unsaved modifications are not lost. This gets
important when the user will be able to propose changes to the access
rights through code review. This will be implemented by a follow-up
change.

Change-Id: Ibb3b89cbae4d7ca44558d45a4df4c6af3de313e2
Signed-off-by: Edwin Kempin <edwin.kempin@sap.com>
Allow to propose changes to access rights through code review

Users that are able to upload changes for code review for the
refs/meta/config branch can now propose changes to the project access
rights through code review directly from the ProjectAccessScreen.

When editing the project access rights there will be a new button
'Save for Review' which will create a new change for the access
rights modifications. Project owners are automatically added as
reviewer to this change. If a project owner agrees to the access rights
modifications he can simply approve and submit the change.

Change-Id: Ica40ce3f57726bdb897e01783cc6da10f1d392cc
Signed-off-by: Edwin Kempin <edwin.kempin@sap.com>
Signed-off-by: Sasa Zivkov <sasa.zivkov@sap.com>
Signed-off-by: Gustaf Lundh <gustaf.lundh@sonymobile.com>
Signed-off-by: Ulrik Sjölin <ulrik.sjolin@sonyericsson.com>
Reject submitting change if its destination branch does not exist

If a branch got deleted and there was an open change for this branch,
it was still possible to submit this open change. As result the
destination branch was implicitly recreated, even if the user
submitting the change had no privileges to create branches.

Change-Id: I8adc9f75c3e04f325a39a6e2eec13035c0eda424
Signed-off-by: Edwin Kempin <edwin.kempin@sap.com>
Link from plugin list to plugin info page

In the admin list of plugins installed, each plugin now links to the
info page which shows more details for that plugin.

Change-Id: I3e2d18111ec3f050fc6c257de1303ba2e7082660
Catch all exceptions when emailing change update

Similar to b429744e51f2a7572562eea1c40c76de49776193 catch all
exceptions when sending emails on change update fails and log the
error.

Without this change if an exception occurs, on restore/abandon a
change from the WebUI the change screen is not updated with the new
change status and the popup dialog is not closed.

Change-Id: If1aa1a3d88b8fa997e709e6e360ac4019810a31d
Signed-off-by: Edwin Kempin <edwin.kempin@sap.com>
Display the approval table on the Publish Comments screen.

The ApprovalTable (displayed only on the ChangeDetail screen currently)
has been added to the PublishCommentScreen, in order to see all
existing votes, and which other users are set as reviewers of the
change.

ApprovalTable also gives hints as to which votes are still required
before the change can be submitted, and it gives the reviewer the
option to add additional reviewers directly from the comment page.

This also fixes an order-of-operations bug pointed out in the initial
change, which was reverted: Ie42f86dc1509749f8cfa4fcea08e2ebf5a793ede.

Bug: Issue 1383
Change-Id: I49a9524871495d02ae3a5887a349ed26485723c0
Fix closing of dialog on restore/abandon

When a change is restored/abandoned in the WebUI a popup dialog appears
so that a reason for restoring/abandoning the change can be entered. On
successfull restore/abandon the dialog is not closed but stays open.
This is because there is an exception in one of the listeners for the
fired ValueChangeEvent<ChangeDetail>. The exception happens in
CommitMessageBlock when adding the star icon to the starPanel because
starPanel is a SimplePanel which can have only a single widget as
child. On restore/abandon the starPanel is already hosting the star
icon and when adding another star icon it fails.

This change clears the star panel every time display is called. This
allows the star icon to be removed if display() is called with a null
changeId after a star icon has already been instantiated.

Change-Id: I1cb61188140639299b0aec6cd4fbfb8848b064e3
SSH-command : set-project

Change a project's settings such as merge-type-strategy, require-
change-id, use-content-merge, project-state  from CLI.

[verse]
'ssh' -p <port> <host> 'gerrit set-project'
  [--description <DESC> | -d <DESC>]
  [--submit-type <TYPE> |  -t <TYPE>]
  [--use|no-contributor-agreements | --ca|nca]
  [--use|no-signed-off-by | --so|nso]
  [--use|no-content-merge]
  [--require|no-change-id | --id|nid]
  [--project-state | --ps]
  <NAME>

Change-Id: I8352ffeda0d3ca7af61d45c44c93b62035e20676
Merge "Fix closing of dialog on restore/abandon"
Merge "Catch all exceptions when emailing change update"
Merge "SSH-command : set-project"
Refine finding by nameOrEmail

Currently finding all users by email relies on the fact that the
email address is unique. Since this is not the case (yet) finding
users by email can fail when the same email is added to a user
via SSH command create-account.

Refine the search and return the user that is most likely to be
the user we are searching for by first filtering by email and
later by full name.

Change-Id: I65e77cdbefd7ba607b2ad23282a61aabe41c3e49
Merge "Refine finding by nameOrEmail"
Add an AuthMethod to WebSession

For purpose of skipping/using xsrf validation, we need to know
how a user authenticated.  This change adds an AuthMethod enum value
to WebSession.

Change-Id: I26bc8ea2ba80d8c7cac0d124d7e76ca55da62716
Merge "Link from plugin list to plugin info page"
Merge "Display error if modifying access rights for a ref is forbidden"
Merge "Allow to propose changes to access rights through code review"
Fix build error in SetProjectCommand

This was a merge error caused by Martin and I both merging
incompatible changes at the same time. I merged something that
modified this API, Martin merged a new caller of the API.

Change-Id: Iee5e2479f24d7a1e151c670a1f10a071c9547f84
Merge "Add an AuthMethod to WebSession"
Merge "Display the approval table on the Publish Comments screen."