Closed gotjoshua closed 2 years ago
What does your permissions
object look like that you pass to initialise
?
What does your
permissions
object look like
const suffix = '-test3'
export const appNameObj = {
name: `color-schemes${suffix}`,
creator: `1zm${suffix}`,
}
const publicDirectoryArray = [
wn.path.directory(appNameObj.creator, appNameObj.name),
wn.path.directory(appNameObj.creator, appNameObj.name, 'links')
]
state = await wn.initialise({
permissions: {
app: appNameObj,
fs: { // Ask the user permission for additional filesystem paths
public: publicDirectoryArray,
},
},
})
not sure if it makes much sense to continue this line of inquiry until after your big upgrade is released...
but... I think the permissions object should be completely irrelevant if i am querying a public path ls and exists and cat should all be easy to use for all users public paths, independent of any permissions.
We chose this route so the user can easily see when authorising an app which files an app will touch. But yes, you're right, for reading we might need to change that, since it's public anyway.
Does this work when you request permissions for the entire public directory?
Which you would do in the following way:
permissions: {
fs: {
public: [ wn.path.root() ]
}
}
Does this work when you request permissions for the entire public directory?
I'll need to check later... neck deep in other stuff and no longer interested in using cat with single files as the car file strategy for the whole directory is sooooo much faster.
(but thanks for engaging, none the less!)
Summary with details
I have a file clearly available in a public user folder
When i try to access it via cat i get this error:
note1: [links,1zoom_Colors,] is a wnfs symlink to: https://1zoom.files.fission.name/p/1zm-test1/color-schemes-test1/Colors/
note2: I can
ls
the folder just fine (thats how i get the filename to try thecat
commandDesktop (please complete the following information):