Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature: Allow @USER@ token in namespace configuration #8

Open
iainhallam opened this issue Jan 15, 2022 · 0 comments
Open

Feature: Allow @USER@ token in namespace configuration #8

iainhallam opened this issue Jan 15, 2022 · 0 comments

Comments

@iainhallam
Copy link

iainhallam commented Jan 15, 2022

(Taken from the discussion at https://www.dokuwiki.org/plugin:avatar)

"Instead of avatars coming from a fixed namespace, I would like to be able to specify a tokenized filename for the avatar. For example, I have my DW set up so that each user has a “user namespace” in which they have full permissions, and I would like that avatar to come from that namespace.

"This is a lot easier to manage since there is no a-priori avatar, and thus ACL permission cannot be granted to upload the file - I want users to be able to change their own avatars without other users being able to; since you can't grant delete permission to a namespace, there is no way to stop users overwriting each others' avatars unless they are in separate protected namespaces.

"This can be achieved by changing the namespace conf setting so that it looks something like user/@USER@/avatar (perhaps even renaming the configuration setting so that it is called filename, since that is a more meaningful description of the setting under this proposal). This is then resolved in _getAvatarURL into the right form, e.g. user/my_user_name/avatar, and then the files user/my_user_name/avatar.jpg etc are searched for.

"i.e. changing the line $avatar = $this→getConf('namespace').':'.$user; to read

$avatar = str_replace( '@USER@', $user, $this->getConf('filename') );

"Of course, the status quo can be achieved through this new system also, by setting the namespace/filename conf setting to user/@USER@."

– Andy Turner 2009-07-14 15:10

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant