Re: [sakai-dev] Re: Sakai 11 Manage Access - joining behavior changed

classic Classic list List threaded Threaded
1 message Options
Austin Nakasone Austin Nakasone
Reply | Threaded
Open this post in threaded view
|

Re: [sakai-dev] Re: Sakai 11 Manage Access - joining behavior changed

Hello Sakai Devs,

I believe I'm running into this problem as well in Sakai 11.4.

- Create a site with a site alias
- login as a user who is not a participant of that site
- There is an error and you can't join the site.

I tried setting the sakai properties that Sanghyun mentioned

itemanage.join.joinerGroup.enabled=true
sitemanage.join.notification.enabled=true
sitemanage.join.excludeFromPublicList.enabled=true
sitemanage.join.limitAccountTypes.enabled=true
sitebrowser.join.enabled=true

sitemanage.grant.auth=true 
sitemanage.grant.anon=true

however, the problem still happened.

Stepping through the code, it looks like these lines were added to JoinHandler.java

boolean restrictedByAccountType = !SiteService.getInstance().isAllowedToJoin(siteId);
context.put("restrictedByAccountType", restrictedByAccountType);

Then stepping into isAllowedToJoin(siteId), it looks like it gets to some sql to get the site

select SAKAI_SITE.SITE_ID,SAKAI_SITE.TITLE,SAKAI_SITE.TYPE,SAKAI_SITE.SHORT_DESC,SAKAI_SITE.DESCRIPTION,SAKAI_SITE.ICON_URL,SAKAI_SITE.INFO_URL,SAKAI_SITE.SKIN,SAKAI_SITE.PUBLISHED,SAKAI_SITE.JOINABLE,SAKAI_SITE.PUBVIEW,SAKAI_SITE.JOIN_ROLE,SAKAI_SITE.IS_SPECIAL,SAKAI_SITE.IS_USER,SAKAI_SITE.CREATEDBY,SAKAI_SITE.MODIFIEDBY,SAKAI_SITE.CREATEDON,SAKAI_SITE.MODIFIEDON,SAKAI_SITE.CUSTOM_PAGE_ORDERED,SAKAI_SITE.IS_SOFTLY_DELETED,SAKAI_SITE.SOFTLY_DELETED_DATE from SAKAI_SITE where ( SITE_ID = ? )

But since the site_id that gets passed in is an "alias", it's not finding the site.

so I think back in JoinHandler.java, I think if we replace

boolean restrictedByAccountType = !SiteService.getInstance().isAllowedToJoin(siteId);
with
boolean restrictedByAccountType = !SiteService.getInstance().isAllowedToJoin(site.getId());

that ought to work?  Let me know if this sounds like a real bug and if I should start a JIRA?

Thanks,

Austin





Inline image 1



On Wed, Sep 6, 2017 at 8:35 AM, Sanghyun Jeon <[hidden email]> wrote:
Thank you for clarification, Brian. So i will delete this setting.

I think I figure it out the why our 11.2 does not work properly.
Once I add SAK-29695 and it works as expected.

Thank you for all.

S


On Wed, Sep 6, 2017 at 11:18 AM, Brian Jones <[hidden email]> wrote:
Just as an FYI, the functionality of sending an email notification on
join (controlled by the "sitemanage.join.notification.enabled" property)
was rejected by the community due to cyclical dependencies. As such,
this one aspect of joinable sites is not a feature implemented in the
community code base. This decision is outlined in the comments on
SAK-24423 and the property is not included in default.sakai.properties.

We do plan on refactoring this implementation in the future to get it
into the core code base.

Brian Jones
Programmer/Analyst
Western Technology Services
Support Services Building, Suite 4300
Western University
<a href="tel:%28519%29%20661-2111%20x86969" value="+15196612111" target="_blank">(519) 661-2111 x86969
[hidden email]

On 2017-09-06 02:12 PM, Sanghyun Jeon wrote:
> Thank you so much for your reply and tests on the QA servers, Alan.
> Indeed, QA servers (11.4 and 11.x) work fine.
> I check both JIRAs, but I don't think these are the root culprit. Below
> are my configurations.
>
>  sitemanage.join.joinerGroup.enabled=true
>  sitemanage.join.notification.enabled=true
>  sitemanage.join.excludeFromPublicList.enabled=true
>  sitemanage.join.limitAccountTypes.enabled=true
>  sitebrowser.join.enabled=true
>
> I test it without site alias, but still not working. I am wondering
> whether you can see any anomalies on my settings.
> I also checked JIRA 29970, which I did not add them. Do you think that
> might be the cause of this trouble?
>
> Unfortunately, we just migrated to 11.2 so another upgrade is not my
> option but I will try it to our dev server later.
>
> Would you mind sharing your property settings for this joinable site
> with me?
> Thank you in advance.
>
> S
>
> On Tue, Sep 5, 2017 at 4:56 PM, alan.regan <[hidden email]
> <mailto:[hidden email]>> wrote:
>
>     I just tested on our local Sakai 11.4 instance and the Sakai 11.x
>     Maintenance Branch. The feature works as expected with direct URL
>     and joinable sites, at least based on my quick tests.
>
>     Steps I took:
>
>      1. I created two users (USER-A and USER-B) on the Sakai 11.x
>         maintenance branch
>         - https://qa11-mysql.nightly.sakaiproject.org/
>         <https://qa11-mysql.nightly.sakaiproject.org/>
>      2. With "USER-A," I created a project site and set the site
>         joinable (Site Info > Manage Access > Global Access > Allow any
>         Sakai user to join the site).
>      3. With "USER-A," I copied the direct URL for the site from Site Info
>      4. With "USER-A," I logged out.
>      5. I logged in with "USER-B."
>      6. I pasted the direct URL into the browser address bar.
>      7. "USER-B" was presented with the notice, "Would you like to join
>         the site? YES / NO"
>      8. I clicked "Yes" and site enrollment was added.
>
>     I also tested when the user wasn't logged into the service. I
>     created a third user account, and logged out.  In a new web browser,
>     I pasted the direct URL for the joinable site.  The login prompt
>     appeared. After successful login, then the "Would you like to
>     join..." notice displayed and the user could join the site.
>
>     You mentioned Sakai 11.2.  The maintenance branch is Sakai 11.4+
>     (perhaps close to Sakai 11.5?).
>
>     It's possible you may need to upgrade from 11.2 to 11.4?
>
>     Or maybe there is a setting, flag, or config that's necessary on
>     your local instance?  It looks like there are several config
>     settings available (and possibly more than what's listed in this JIRA):
>     https://jira.sakaiproject.org/browse/SAK-24423
>     <https://jira.sakaiproject.org/browse/SAK-24423>
>
>     Else, the only other item I found was this JIRA about short URL and
>     joinable sites having issues.  Maybe this is the cause of your issue?
>     https://jira.sakaiproject.org/browse/SAK-32634
>     <https://jira.sakaiproject.org/browse/SAK-32634>
>
>     I don't know if anything here helps, but I wish you luck in
>     resolving your situation.
>
>     --Alan
>
>
>     On Tuesday, September 5, 2017 at 3:44:43 PM UTC-7, euksa99 wrote:
>
>         Dear All,
>
>
>
>         After migrating to Sakai 11.2 from Sakai 10.7, we notice that
>         the site url no longer allows non-participant users to join the
>         joinable site and become a member when sending out the site url
>         link. Now, looks like users can join joinable sites only by
>         having them search for the site via Membership.
>
>
>         In Sakai 10.7, when invited users click the share link (site
>         url), the share link would prompt non-participant users to join
>         if the permissions of Manage Access were set up correctly as
>         follows:
>
>         Inline image 1
>
>         I notice that Sakai 11’s manage access has some new features
>         during our testing, but I am wondering whether there are any
>         possibilities to restore this direct joining feature via the
>         share link in the upstream version, which was more streamline
>         procedure for joining site.
>
>
>         Thank you in advance.
>
>
>         S
>
>     --
>     You received this message because you are subscribed to the Google
>     Groups "Sakai Development" group.
>     To unsubscribe from this group and stop receiving emails from it,
>     send an email to [hidden email]
>     <mailto:[hidden email]>.
>     To post to this group, send email to [hidden email]
>     <mailto:[hidden email]>.
>     Visit this group at
>     https://groups.google.com/a/apereo.org/group/sakai-dev/
>     <https://groups.google.com/a/apereo.org/group/sakai-dev/>.
>
>
> --
> You received this message because you are subscribed to the Google
> Groups "Sakai Development" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to [hidden email]
> <mailto:[hidden email]>.
> To post to this group, send email to [hidden email]
> <mailto:[hidden email]>.
> Visit this group at https://groups.google.com/a/apereo.org/group/sakai-dev/.

--
You received this message because you are subscribed to the Google Groups "Sakai Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/a/apereo.org/group/sakai-dev/.

--
You received this message because you are subscribed to the Google Groups "Sakai Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/a/apereo.org/group/sakai-dev/.

--
You received this message because you are subscribed to the Google Groups "Sakai Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/a/apereo.org/group/sakai-dev/.