Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

User permissions #2147

Merged
merged 33 commits into from
May 18, 2018
Merged

User permissions #2147

merged 33 commits into from
May 18, 2018

Conversation

KlapTrap
Copy link
Contributor

The base framework to get user roles and work out their permissions.

Note: This hasn't been applied to all areas of the app, we will do this in another PR.

KlapTrap and others added 17 commits May 3, 2018 16:55
* v2-master: (77 commits)
  Fixed small typos
  Removed console.log, unsub before reassigning sub
  Fix merge issues
  Weekly status update
  Do not show menu items when non admin with no endpoints
  Validate service and app binding params are JSON
  Fix chip list indentation
  Lint fox
  Tidy up deletion screen
  Fix instance delete
  Rename selectors
  CC fixes
  Fixed tests
  Delete unused method
  Fix lint
  Stop event bubbling
  Get most recent apps
  Fixed some tests
  Addressed review comments
  Recursive delete application
  ...
@cfdreddbot
Copy link

Hey KlapTrap!

Thanks for submitting this pull request! I'm here to inform the recipients of the pull request that you and the commit authors have already signed the CLA.

@KlapTrap KlapTrap self-assigned this May 11, 2018
KlapTrap and others added 7 commits May 14, 2018 12:09
* v2-master: (161 commits)
  Small improvements for back end dev
  Ignores PRs for e2e tests
  FIx formatting
  Use no-sandbox as generally recommended
  Don't run e2e tests on PRs
  Address PR feedback
  Markup codeclimate fixes..
  Tweak secrets.yaml + missing message
  Four fixes/tweaks - Tweak select folder/file button padding to ensure we don't wrap - Tweak host flex to ensure git input fields don't wibble when switching type - Fixed bug where deploy step close button would not become enabled on errors - Fixed issue where new github 'source config' step was never shown
  Add first to one time obs sub
  Fix line length lint error
  Move dev notes from wiki to docs/
  Update current password required based to reflect if it is required
  This week's status updates
  First set of fixes to address PR feedback
  Fix stepper issue with redirect not working
  Fix code climate issue
  Fix some code climate issues
  Fix merge issue
  Update snackbar.po.ts
  ...
@KlapTrap KlapTrap mentioned this pull request May 16, 2018
10 tasks
@@ -1,12 +1,15 @@
<app-page-header [endpointIds$]="cfIds$">
{{canCreateApplication$ | async}}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

debug code

) {
const dataSource: ListDataSource<APIResource> = appListConfig.getDataSource();
this.cfIds$ = cloudFoundryService.cFEndpoints$.pipe(
map(endpoints => endpoints.map(endpoint => endpoint.guid))
tap(endpoints => endpoints.forEach(endpoint => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Check, possibly nuke

}));

getRequests(endpoints: EndpointModel[]) {
return [].concat(...endpoints.map(endpoint => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

check this doesn't run for admins

return menuItem;
});
this.showMenu$ = combineLatest(actionMenu.map(menuItem => menuItem.can)).pipe(
tap(console.log),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

console.log

return actions;
})
);
}));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing error handler

}

if (type === PermissionTypes.ENDPOINT) {
return this.store.select(getCurrentUserCFGlobalState(permission));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

check this is correct

@@ -0,0 +1,101 @@
import { ActionState } from '../reducers/api-request-reducer/types';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

to nuke

Copy link
Contributor

@richard-cox richard-cox left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Once tests pass this LGTM. Do you want this in before or after user management (there's some minor conflicts)?

I've created #2181 for syncing role changes to permission state (thought this was best as a separate PR to #2118).

We've also got existing #2175 to cover applying these permissions everywhere and #1741 to walk through console as non-cf admin + associated issues.

nwmac and others added 4 commits May 17, 2018 12:34
* v2-master: (22 commits)
  Remove passthrough from delete service instance
  Fix service instance bound app links - Previously cfGuid was `undefined` - Breadcrumbs fixed, previously only one of three was correct - Remove errant <p> from meta card titles, this matches org and space tiles
  Fix unit tests
  Fix update of table
  Removed fdescribe + comment
  Final tweaks
  Fix merge conflict
  Changes in response to feedback
  Merge fix
  Fix lint
  Action menu
  Fix unit tests
  CC refactor
  tweaks
  Flesh out card view
  Add text search
  Services Wall with filters
  Services wall skeleton
  Bug fix for unit test,. Tidy up.
  Fix lint issues
  ...
@KlapTrap KlapTrap merged commit 5084af9 into v2-master May 18, 2018
@nwmac nwmac deleted the user-permissions branch August 29, 2018 08:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants