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

The site URL passed in the setup object is always ignored in the isMember(...) function #175

Closed
alexis-allemann opened this issue Mar 10, 2022 · 6 comments
Labels

Comments

@alexis-allemann
Copy link

Each time I use the isMember(...) function, the url that I passed as a parameter via the setup object is ignored and thus replaced by the url of the current site.
By analyzing the code, I realized that the isMember(...) function calls the usergroups(...) function. When calling this one, the site url parameter was forgotten and this method therefore uses the current site.

@alexis-allemann
Copy link
Author

I have identified the issue. I'll add a new pull request.

@Aymkdn
Copy link
Owner

Aymkdn commented Mar 10, 2022

Thanks. I'll do the necessary changes in the next release.

@Aymkdn Aymkdn added the bug label Mar 10, 2022
@Aymkdn
Copy link
Owner

Aymkdn commented Mar 10, 2022

No need for a pull request, I already identified the issue and I fixed it on my side :-) But I won't release the new code right now.

I can show you what to change (it's pretty straight forward), or in the meantime you can directly use usergroups or another internal function.

@alexis-allemann
Copy link
Author

Okay great thank you, any idea when the next release will be published?

@Aymkdn
Copy link
Owner

Aymkdn commented Mar 10, 2022

any idea when the next release will be published?

Nope… Sorry.

But as I said, you could directly use usergroups in your case.

Aymkdn added a commit that referenced this issue Jun 9, 2022
  - Added option `modify` to `$SP().getManager()`
  - Added `$SP().isSPO()`
  - Changed `$SP().ajax()` to better managed 401 error for the REST API calls
  - Changed `$SP().cleanResult()` when dealing with a date (`$SP().cleanResult("2022-01-19 00:00:00")` will now return "2022-01-19" instead of "2022-01-19 00:00:00")
  - Changed `$SP().toDate()` to ignore the timezone (e.g. `$SP().toDate("2022-01-19")` used to return different result based on the user's timezone, but now it returns the correct date at 00:00:00 in the current timezone)
  - /!\ Changed `$SP().getVersions()`: only compatible with REST API, and it returns a different result/outcome than before
  - /!\ Changed `$SP().hasREST()`: it will always return TRUE (it's possible to override the value) because REST API is around for a while now and I assume everyone is using at least SP2013 (see issue #180)
  - Fixed `$SP().isMember()` for the `url` option (see issue #175)
  - Removed support for IE10 in the bundle for browsers
@Aymkdn
Copy link
Owner

Aymkdn commented Jun 20, 2022

This has been fixed in v6.2.0

@Aymkdn Aymkdn closed this as completed Jun 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants