Extensions: Support token access for remote repositories #121886

Closed
Dalai Felinto wants to merge 5 commits from ideasman42:pr-extensions-acess-token into main

When changing the target branch, be careful to rebase the branch in your fork to match. See documentation.

This introduce a new "secret" per-repository property of type password.

This only shows for remote repositories, and it doesn't show for the "https://extensions.blender.org" repository.

Ref: #121856

TODOs:

  • To send this to the server.

Add Remote Repository dialog:

Extension settings:

Extension settings expanded:

This introduce a new "secret" per-repository property of type password. This only shows for remote repositories, and it doesn't show for the "https://extensions.blender.org" repository. Ref: #121856 TODOs: * To send this to the server. Add Remote Repository dialog: <img src="https://projects.blender.org/attachments/b5c8edb3-cf38-4ded-87d9-d4560eb2b1de" width=300 /> Extension settings: <img src="https://projects.blender.org/attachments/b6312180-c0ea-4fa5-bcf6-0b4dc792e00f" width=300 /> Extension settings expanded: <img src="https://projects.blender.org/attachments/0ec1d5aa-7b0c-4c9a-9cbb-847039ad6d5a" width=300 />
Campbell Barton force-pushed pr-extensions-acess-token from ea5e22b268 to dd7046c87b 2024-05-17 10:13:21 +02:00 Compare

Updated:

  • Make the option to use the access-token an advanced setting, instead of showing this for all extensions.blender.org repositories.
  • Use a variable length string as there doesn't seem to be a commonly accepted limit.

The remaining changes are are to implement this as part of HTTP requests.

Updated: - Make the option to use the access-token an advanced setting, instead of showing this for all extensions.blender.org repositories. - Use a variable length string as there doesn't seem to be a commonly accepted limit. The remaining changes are are to implement this as part of HTTP requests.
Author
Owner

Not sure if it should be advanced, this seems like a pretty common field for repositories. @fsiddi thoughts?

[edit: let me test it actually, before commenting on it :) ]

Not sure if it should be advanced, this seems like a pretty common field for repositories. @fsiddi thoughts? [edit: let me test it actually, before commenting on it :) ]
Author
Owner

Some screenshots from the patch as it is now. The secret only shows when the Use Access Token is on:

Screenshot 2024-05-17 at 15.42.08.png

Screenshot 2024-05-17 at 15.42.56.png

Screenshot 2024-05-17 at 15.43.56.png


I can see the reasoning. Not sure what I think, I'm probably fine

Some screenshots from the patch as it is now. The secret only shows when the Use Access Token is on: ![Screenshot 2024-05-17 at 15.42.08.png](/attachments/82ee2830-e98b-485e-829c-ac0cc39883bf) ![Screenshot 2024-05-17 at 15.42.56.png](/attachments/0bccf459-25ba-4d01-846d-0c393008fc20) ![Screenshot 2024-05-17 at 15.43.56.png](/attachments/bc80cb05-b70c-45e3-8637-4082322dc6bc) ---- I can see the reasoning. Not sure what I think, I'm probably fine

The text field it self is not in advanced, when adding the repository you can enable access-token, that controls the field being displayed. If you wish to change this (as in, access a repository with an access-token which previously didn't need one - or the reverse) after creating the repository, it can be done in advanced because this is a fairly special-case.

This was done because I expect many/most repositories won't use an access token, showing it there for all repositories because they *could* seems odd to me, especially when leaving it empty makes it seem like some necessary field has been left out.

The text field it self is not in advanced, when adding the repository you can enable access-token, that controls the field being displayed. If you wish to change this _(as in, access a repository with an access-token which previously didn't need one - or the reverse)_ after creating the repository, it can be done in advanced because this is a fairly special-case. This was done because I expect many/most repositories won't use an access token, showing it there for all repositories because they \*could\* seems odd to me, especially when leaving it empty makes it seem like some necessary field has been left out.

I'd make sure that the field is easily discoverable, especially when adding a repo. Otherwise most instructions will say "click on the advanced settings", which I rather avoid.

I'd make sure that the field is easily discoverable, especially when adding a repo. Otherwise most instructions will say "click on the advanced settings", which I rather avoid.
Author
Owner

Given that this is prominent when adding a repo I think it is ok. Even if you have to update the token the repo will have it visible since you set it as use token once.

Given that this is prominent when adding a repo I think it is ok. Even if you have to update the token the repo will have it visible since you set it as use token once.
Author
Owner
Patch updated with the latest UI changes from https://devtalk.blender.org/t/2024-05-21-extensions-project/34751#design-topics-4
Campbell Barton force-pushed pr-extensions-acess-token from 7f4d989c34 to ab1ab49b3b 2024-05-22 11:42:33 +02:00 Compare
Campbell Barton force-pushed pr-extensions-acess-token from 95bf6bf09a to 67fd339fee 2024-05-22 12:29:04 +02:00 Compare

Committed 08df46d7cd.

Committed 08df46d7cd555340a654af80fb1becf93cfa52bd.
Campbell Barton closed this pull request 2024-05-22 12:43:19 +02:00
Dalai Felinto changed title from WIP: Extensions: Support token access for remote repositories to Extensions: Support token access for remote repositories 2024-05-23 08:09:10 +02:00
Author
Owner

For the records, the part about actually passing the secret was implemented on: 171319d9ef

For the records, the part about actually passing the secret was implemented on: 171319d9efa8ae2d159533c0d485e5a0c2a9afc6

Pull request closed

Sign in to join this conversation.
No reviewers
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset System
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
EEVEE & Viewport
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Asset Browser Project
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
EEVEE & Viewport
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
3 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender#121886
No description provided.