1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-13 10:22:42 +01:00
Commit graph

18 commits

Author SHA1 Message Date
lkassianik
4d362ddcee Ref T6049, Add Phurl URL create capability
Summary: Ref T6049, Add Phurl URL create capability

Test Plan:
- Change {nav Home > Applications > Phurl > Configure} to allow no one to create Phurl URLs
- Attempt {nav Phurl > Shorten URL}. Should not be able to create a Phurl.

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: Korvin

Maniphest Tasks: T6049

Differential Revision: https://secure.phabricator.com/D14510
2015-11-20 10:11:06 -08:00
lkassianik
a41b857882 Ref T6049, Phurl object view should always display some sort of header.
Summary: Ref T6049, Phurl object view should display Phurl name or Phurl long url as header.

Test Plan:
- Create Phurl with no name. Header should show long url as header.
- Add name to Phurl. Header should be new Phurl name.

Reviewers: #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: Korvin

Maniphest Tasks: T6049

Differential Revision: https://secure.phabricator.com/D14502
2015-11-18 11:18:02 -08:00
lkassianik
59c5cd95e7 Remarkup links to link to short url instead of long and fix commenting on Phurl's
Summary: Ref T6049, remarkup links to use short URLs and make commenting on Phurl's actually work

Test Plan:
- Create Phurl `U123`
- Comment on that Phurl `((123))`
Comment should link to `/u/123`

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: Korvin

Maniphest Tasks: T6049

Differential Revision: https://secure.phabricator.com/D14477
2015-11-17 11:02:13 -08:00
lkassianik
2b5bb642c0 Provide a more informative alternative to 404 on invalid shortened Phurl URL
Summary: When accessing an invalid URL on the short Phurl domain, users should see informative message

Test Plan: Open URL in the previously configured Phurl short domain such as `https://www.zz.us` and see dialog with message. Open `https://www.zz.us/u/123` for a valid `U123` Phurl and access destination URL.

Reviewers: #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: Korvin

Differential Revision: https://secure.phabricator.com/D14450
2015-11-10 08:43:17 -08:00
lkassianik
d8111f828f Allow a domain other than the install domain to serve as a short Phurl domain
Summary: Ref T8995, config option for Phurl short domain to share shortened URL's

Test Plan:
- Configure Phurl short domain to something like "zz.us"
- Navigate to `zz.us`; get 404
- Navigate to `zz.us/u/3` or `zz.us/u/alias` where `U3` is an existing Phurl; redirect to correct destination

Reviewers: #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: Korvin

Maniphest Tasks: T8995

Differential Revision: https://secure.phabricator.com/D14447
2015-11-09 11:34:20 -08:00
lkassianik
268fac25d5 Add Phurl Remarkup
Summary: Ref T9722, Add Phurl Remarkup as `((id))` or `((alias))`

Test Plan: Add a comment to any object as `((id))` or `((alias))`. Make sure comment renders as a link.

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: Korvin

Maniphest Tasks: T9722

Differential Revision: https://secure.phabricator.com/D14427
2015-11-06 19:42:20 -08:00
lkassianik
9132b565d5 Updating xaction titles for Phurl updates
Summary: Ref T8992, Cleaning up and clarifying xaction titles for Phurl creation/updating.

Test Plan: Create a Phurl, update information, make sure xaction in the timeline makes sense.

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: Korvin

Maniphest Tasks: T8992

Differential Revision: https://secure.phabricator.com/D14414
2015-11-05 10:54:45 -08:00
lkassianik
e2c0df4fb4 Preventing duplicate empty string aliases in Phurl's
Summary: Ref T8992, Make it impossible to save an empty string alias for a Phurl.

Test Plan:
- Create two Phurl's with non-empty aliases
- Delete aliases for both Phurl's
- Previously, this wouldn't allow to save the second Phurl because of a duplicate alias. Current diff should save empty alias as `null`, not empty string.

Reviewers: #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: Korvin

Maniphest Tasks: T8992

Differential Revision: https://secure.phabricator.com/D14413
2015-11-05 10:14:07 -08:00
lkassianik
5c6d2be18f Helper method for max text field length and validate alias length
Summary: Ref T8992, Validate alias text field length.

Test Plan: Create Phurl with alias of more than 64 characters. Get error. Reduce length of alias to successfully save Phurl.

Reviewers: #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: Korvin

Maniphest Tasks: T8992

Differential Revision: https://secure.phabricator.com/D14403
2015-11-04 10:22:23 -08:00
lkassianik
262d7b7780 Check that Phurl alias is unique
Summary: Ref T8992, Phurl aliases must be unique. Otherwise throw an error.

Test Plan: Create two Phurl's both with alias 'asdf'. When saving second Phurl, form should show an error about the duplicate alias.

Reviewers: #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: Korvin

Maniphest Tasks: T8992

Differential Revision: https://secure.phabricator.com/D14401
2015-11-04 09:05:37 -08:00
lkassianik
2b05f7cc43 Add an alias to Phurl URL's
Summary: Ref T8992, Add an alias to Phurl URL's that can be used to redirect to link.

Test Plan: Add an alias to Phurl object, and navigate to `local.install.com/u/<newalias>`. This should redirect to the Phurl's URL.

Reviewers: #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: joshuaspence, Korvin

Maniphest Tasks: T8992

Differential Revision: https://secure.phabricator.com/D14395
2015-11-03 19:09:42 -08:00
lkassianik
60cf71e724 Validate new Phurl URL
Summary: Closes T9691, Validate URL on Phurl objects for using valid protocols.

Test Plan: Create or edit URL. Change URL to "asdf" and observe error. Change back to "http://google.com" and observe no error.

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: Korvin

Maniphest Tasks: T9691

Differential Revision: https://secure.phabricator.com/D14389
2015-11-02 13:53:19 -08:00
lkassianik
99daadb251 Phurl URL object should show a banner if the URL is invalid
Summary: Ref T8989, Phurl URL should always show an info banner if the URL isn't valid

Test Plan: Phurl objects with URL "google.com" should show an error banner, but objects with URL "http://google.com" should not show banner.

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: Korvin

Maniphest Tasks: T8989

Differential Revision: https://secure.phabricator.com/D14386
2015-11-02 13:09:15 -08:00
lkassianik
809453a3e1 Ref T8989, Phurl "Visit URL" link should route through a separate controller.
Summary: Ref T8989, Phurl "Visit URL" should now route to an access controller that decides if the URL is valid whether to open it, or redirect back to Phurl object. New route is `local.install.com/u/1` to open link.

Test Plan:
- open Phurl object with invalid URL, "Visit URL" link should redirect back to object
- open Phurl object with valid URL, "Visit URL" link should open the link
- open `local.install.com/u/1` for `U1` with valid URL should open the link
- open `local.install.com/u/1` for `U1` with invalid URL should redirect to `local.install.com/U1`

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: joshuaspence, Korvin

Maniphest Tasks: T8989

Differential Revision: https://secure.phabricator.com/D14381
2015-11-02 12:10:37 -08:00
Joshua Spence
495cb7a2e0 Mark PhabricatorPHIDType::getPHIDTypeApplicationClass() as abstract
Summary: Fixes T9625. As explained in a `TODO` comment, seems reasonable enough.

Test Plan: Unit tests.

Reviewers: #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: Korvin, hach-que

Maniphest Tasks: T9625

Differential Revision: https://secure.phabricator.com/D14068
2015-11-03 06:47:12 +11:00
lkassianik
09d4ea884f Ref T8989, Add a "Visit URL" link to Phurl items.
Summary: Ref T8989, Add a "Visit URL" link to Phurl items and make it actionable if the URI has a valid protocol.

Test Plan:
- Create a Phurl object with a URI of "google.com".
- "Visit URL" action in action view should be greyed out.
- Edit object to have URI "http://google.com" and save. "Visit URL" link should be available and should redirect to the intended URL.

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: chad, Korvin

Maniphest Tasks: T8989

Differential Revision: https://secure.phabricator.com/D14379
2015-11-02 16:40:56 +00:00
Chad Little
36fc6a622c Fix missing mailtags in PHUrl
Summary: Adds in missing mailtag constants in PHUrl

Test Plan: view email settings page

Reviewers: epriestley, lpriestley

Subscribers: epriestley, Korvin

Differential Revision: https://secure.phabricator.com/D13709
2015-07-24 21:30:16 -07:00
lkassianik
930b6fec25 DRAFT - throw together Phurl skeleton.
Summary: DRAFT - throw together Phurl skeleton.

Test Plan: The idea is that `some/long/url` will become `install/Udet4d` and can be viewed and edited at `install/Udet4d/view` and `install/Udet4d/edit`, respectively?

Reviewers: #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: joshuaspence, chad, epriestley, Korvin

Maniphest Tasks: T6049

Differential Revision: https://secure.phabricator.com/D13681
2015-07-24 11:06:27 -07:00