appsmith
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
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
- Go to templates and fork any app to your organization
- Deploy app and make sure the app has been marked
public
- 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
Public Sample App
https://release.app.appsmith.com/applications/624e8ab26aefb866285ad13d/pages/624e8ab26aefb866285ad13f
Version
Cloud
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 , 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.
@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.
Cannot Reproduce the issue, discussed with @kocharrahul7 CC: @GreenFlux
Public app setting is not appropriately set as per expected behaviour