1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-22 06:42:42 +01:00
No description
Find a file
Valerio Bozzolan 3367fe0017 Drag & Drop Task Cover Image: also attach
Summary:
After this change, the cover image is finally always visible to others (to people who can see the Task)
instead of being visible only to yourself.

Example conversation before this change:

- Anna: (uploads a nice Cover Image on the Task, using drag & drop from the Workboard)
- Bob: Thanks! But I cannot see that image. Please change visibility.
- Anna: Ouch! How?
- Bob: I don't know. Try Files > your File > Edit > Set Visibility > Something that includes "Bob".
- Anna: Done. Do you see my image now? (Spoiler: it's a green pepper)
- Bob: Yes and no. I mean, I can see the original file, but not from the Workboard.
- Anna: Uh? Have you tried refreshing your cache?
- Bob: Yes. Still invisible from Workboard.
- Anna: Maybe you have to change Defaults Permissions of the "Files" Application, to have "All Users"
- Bob: That is a bit invasive. Let's try. I changed the Files policy globally. Try re-uploading your image again.
- Anna: Done. Do you see it now?
- Bob: Yes! I can finally see it now, also from the Workboard.

Example conversation after this change:

- Anna: (uploads a nice Cover Image on the Task, using drag & drop from the Workboard)

Done! So, after this change, everything works as expected. Every task participant can see that image,
and nobody starts a nonsense conversation, and nobody needs to do random experiments with
default application policies.

So, after this change:

- the original file is attached to the Task
- the cover image is not orphan anymore, but mentioned in the "Transforms" of the original file
- the cover image so now inherits the original file policies

So, Task participants can finally see that cover image (transform), since it comes from a file,
and that file is attached to the Task, and since they can see that Task.

For a micro-optimization, this change refactors a bit PhabricatorFile.

You can still work in object-oriented:

    lang=php
    $file->attachToObject($task_phid);

But now you can also work directly with PHIDs, if necessary:

    lang=php
    PhabricatorFile::attachFileToObject($file_phid, $task_phid)

This patch somehow improves T15768.

Closes T15163
Closes T15703

Test Plan:
Visit a Workboard with a Column and a Task. Then:

1. Drag & Drop GNU.png from your computer to that Task
2. Drag & Drop GNU.png again there
3. Drag & Drop Linux.png to that Task
4. Drag & Drop Linux.png again
5. No nuclear implosion.
6. In all cases Task participants can see your Cover Image.

Reviewers: O1 Blessed Committers, avivey

Reviewed By: O1 Blessed Committers, avivey

Subscribers: avivey, speck, tobiaswiese, Matthew, Cigaryno

Maniphest Tasks: T15163, T15703

Differential Revision: https://we.phorge.it/D25475
2024-04-29 17:34:40 +02:00
bin Remove the "ssh-auth-key" script 2019-10-28 17:52:37 -07:00
conf Change some instances of "phabricator" to "phorge" 2023-11-18 22:14:15 +00:00
externals Make incoming mail handling more robust / correct 2024-04-04 22:19:54 +02:00
resources Celerity map late update 2024-03-07 11:29:25 +01:00
scripts Make incoming mail handling more robust / correct 2024-04-04 22:19:54 +02:00
src Drag & Drop Task Cover Image: also attach 2024-04-29 17:34:40 +02:00
support Replace all phurl.io short URIs with target URIs 2024-02-28 14:59:29 +01:00
webroot Improve remarkup codeblock syntax highlighting when using Dark Mode 2024-03-03 15:58:03 +01:00
.arcconfig T15006: Update .arcconfig to point to we.phorge.it 2021-06-18 14:51:47 -04:00
.arclint Merge Phacility/master into phorge 2022-07-25 11:50:26 -07:00
.arcunit Use the configuration driven unit test engine 2015-08-11 07:57:11 +10:00
.editorconfig Fix text lint issues 2015-02-12 07:00:13 +11:00
.gitignore Generate Diviner book for Javelin 2023-08-30 11:20:12 -07:00
LICENSE Fix text lint issues 2015-02-12 07:00:13 +11:00
NOTICE Remove some "Phacility" and "epriestley" references 2021-07-08 10:46:17 -07:00
README.md Update Readme 2021-06-18 11:36:31 -04:00

Phorge is a collection of web applications which help software companies build better software.

Phorge is a community-maintained fork of Phabricator.

Phorge includes applications for:

  • reviewing and auditing source code;
  • hosting and browsing repositories;
  • tracking bugs;
  • managing projects;
  • conversing with team members;
  • assembling a party to venture forth;
  • writing stuff down and reading it later;
  • hiding stuff from coworkers; and
  • also some other things.

Phorge is developed and maintained by The Phorge Team.


LICENSE

Phorge is released under the Apache 2.0 license except as otherwise noted.