-
Notifications
You must be signed in to change notification settings - Fork 56
Allow users to generate API tokens with the desired access #410
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
Conversation
| close: () => void | ||
| setShowRegeneratedModal: React.Dispatch<React.SetStateAction<boolean>> | ||
| editData: EditDataType | ||
| customDate |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please provide type
|
|
||
| export const getSelectedEnvironments = (permission) => { | ||
| if (permission.accessType === ACCESS_TYPE_MAP.DEVTRON_APPS) { | ||
| return permission.environment.find((env) => env.value === '*') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can change this implementation to single for loop
| action: permission.action.value, | ||
| team: permission.team.value, | ||
| environment: getSelectedEnvironments(permission), | ||
| entityName: permission.entityName.find((entity) => entity.value === '*') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same here
| } | ||
| } | ||
|
|
||
| interface SinglrDatePickerProps { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please fix typo
| placeholder="Enter a description to remember where you have used this token" | ||
| className="form__textarea" | ||
| value={editData.description} | ||
| onChange={(e) => onChangeEditData(e, 'description')} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can add name here to remove inliune function
| /> | ||
| <div className="icon-dim-16 ml-8"> | ||
| <Clipboard | ||
| onClick={(e) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
inline function can be removed
| > | ||
| <Clipboard className="icon-dim-16" /> | ||
| Copy token | ||
| <button className="flex cta mt-20 mb-20" onClick={(e) => handleCopyToClipboard(e)}> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove inline function change it to {handleCopyToClipboard}
Description
Allow users to generate API tokens with the desired access:
Fixes devtron-labs/devtron#1810
Type of change
Checklist: