appsmith icon indicating copy to clipboard operation
appsmith copied to clipboard

[Bug]: Template apps aren't publicly accessible on first deploy. Needs an additional step to toggle public app setting for it to work

Open ramsaptami opened this issue 2 years ago • 3 comments

Is there an existing issue for this?

  • [X] I have searched the existing issues

Description

Template apps aren't automatically public even when the toggle has been set. We need to toggle public setting to off and then back on for the app to be recognized as public.

Steps To Reproduce

  1. Go to templates and fork any app to your organization
  2. Deploy app and make sure the app has been marked public
  3. Copy share link and access it on incognito/another browser and observer a message pop-up saying Resouce not found and redirecting user to login page

LOOM DEMO

Public Sample App

https://release.app.appsmith.com/applications/624e8ab26aefb866285ad13d/pages/624e8ab26aefb866285ad13f

Version

Cloud

ramsaptami avatar Apr 07 '22 07:04 ramsaptami

I thinks apps are not public by default. The share modal does show that it is public but it is incorrect. I think it is picking up from the exported json of the template app where the application is marked as public. @kocharrahul7 Not sure how the templates are uploaded but is there a way to set the public field to false for the template app. If there isn't a way then I think it is a bug in the backend where the field is to be set as false when imported as it is a new application altogether.

akash-codemonk avatar Aug 08 '22 06:08 akash-codemonk

@akash-codemonk , yes, we can set the public field to false before exporting the app JSON that is used when forking. That should avoid the mismatched state of the public switch in the share modal.

I think the default should be that the new forked app is not public when first forked, even if the source app is public. This is what the platform is currently doing, but the share modal is not properly reflecting the new app's state.

This seems like a bug in the forking process. We could avoid it by toggling the public flag before exporting the app, but I think we should fix the forking process so the toggle reflects the current state of the new app, instead of showing the source app's share setting.

GreenFlux avatar Aug 10 '22 18:08 GreenFlux

@akash-codemonk, should we not consider having a default value at the front end for the isPublic flag to False, if the JSON response from the backend is received, it should overwrite the default value to the current value coming from the API response.

NilanshBansal avatar Dec 06 '22 14:12 NilanshBansal

Cannot Reproduce the issue, discussed with @kocharrahul7 CC: @GreenFlux

NilanshBansal avatar Dec 08 '22 06:12 NilanshBansal

Public app setting is not appropriately set as per expected behaviour

ramsaptami avatar Dec 16 '22 06:12 ramsaptami