Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    Peter Keating
    @peterkeating
    @PiemP If you look here - https://github.com/OrchardCMS/OrchardCore/blob/c7373aab70b78869f854009cc6a70898503ef27f/src/OrchardCore.Modules/OrchardCore.Roles/Controllers/AdminController.cs#L274 You can see to obtain which permissions to role has access too, a fake user is created with the role being viewed, and all the possible permissions are validated to see whether the role has access to that permission
    tempcode
    @PiemP
    Thank you @peterkeating ... you give me the right way to see the "Effective" meaning ... I believe is like a sum of Modules default permissions and Recipe permissions ... Like the intial role status...right?
    Peter Keating
    @peterkeating
    @PiemP Yea, it's the roles current permission state.
    Dario Alvarez
    @DariuS231

    With Lucene, How can I filter by a custom field?
    I have the following Query that works fine,

    {
      "query": {
        "bool": {
          "must": [
            { "term" : { "Content.ContentItem.Published": "true" }},
            { "terms" : { "Content.ContentItem.ContentType": ["Solution"] }},
            {
              "bool":{
                "should":[
                  { "match" : { "Content.ContentItem.DisplayText.Analyzed": "{{ keywords }}" }}
                ]
              }
            }
          ]
        }
      }
    }

    But when I try to filter by a custom field I don't get any results. I have tried:

    { "term" : { "Content.ContentItem.SolutionPart.Clients": "4t3hxhrqh8ddfdfdfdfb6v0fdx" }}
    { "term" : { "Clients": "4t3hxhrqh8ddfdfdfdfb6v0fdx" }}
    { "term" : { "SolutionPart.Clients": "4t3hxhrqh8ddfdfdfdfb6v0fdx" }}

    It all has been index and I can see the table with content. How can I know the name of the Column I should use to filter by?

    Peter Keating
    @peterkeating
    @DariuS231 I would typically use the match all query to look at the columns to use. Another good thing to do is use a tool like Luke (https://github.com/DmitryKey/luke/releases/tag/luke-5.5.0) to inspect the documents within the index to see the fields that have been indexed.
    Dario Alvarez
    @DariuS231
    Brilliant, let me have a look at it. Thank you @peterkeating
    Jasmin Savard
    @Skrypt
    @DariuS231 When a field is only analyzed it will not show in the Lucene Query results as it's not "stored".
    It's there but it's only analyzed so that you can query on it
    So, sometimes I use Luke for looking at the index directly
    That's one part of the answer
    You might try to use also a wildcard query on analyzed fields
    And for some fields you might require to store them as a GUID should never be analyzed.
    Mike Paterson
    @devlife
    @MichaelPetrinolis I enabled that setting. Now when I login with google I don't get that error message but it just sends me back to the login OC screen.
    Omid Nasri
    @omidnasri
    Does anybody have any idea how I can access to the "Image" field in:
    Capture.PNG
    Jasmin Savard
    @Skrypt
    use json editor online
    Should be something like Model.Content.CrmBlogPost.Image.Paths[0]
    or
    Model.Content.CrmBlogPost.Image.Paths.first
    in liquid
    Omid Nasri
    @omidnasri
    Ya but is does not work
    Jasmin Savard
    @Skrypt
    show me your code
    Omid Nasri
    @omidnasri
    wait
    Jasmin Savard
    @Skrypt
    or paste the json
    Mike Paterson
    @devlife

    @MichaelPetrinolis I enabled that setting. Now when I login with google I don't get that error message but it just sends me back to the login OC screen.

    It did work! He just didn't have any roles assigned!

    Jasmin Savard
    @Skrypt
    maybe you made a typo because it should work from what I'm seeing
    Omid Nasri
    @omidnasri
    Capture.PNG
    Jasmin Savard
    @Skrypt
    item.Content.CrmBlogPost.Image.Paths.first
    Omid Nasri
    @omidnasri
    Ya but this not work, I don't know
    Jasmin Savard
    @Skrypt
    try displaying item.Content.CrmBlogPost
    Omid Nasri
    @omidnasri
    When displaying result is empty
    Jasmin Savard
    @Skrypt
    can you dump the item.Content
    and paste it here
    or just item
    Omid Nasri
    @omidnasri
    wait
    I apply item.Content
    you can access to result from: http://www.crm-support.ir/blog
    Capture.PNG
    I can't understand why this not work when I use -> item.Content.CrmBlogPost.Image.Paths.first
    Jasmin Savard
    @Skrypt
    And you say that {{ item.Content.CrmBlogPost }} doesn't work?
    Omid Nasri
    @omidnasri
    Yes, result will be empty
    Jasmin Savard
    @Skrypt
    can you do {{ item }} ?
    I want to get all the json
    I can see that there is some warning in the json editor with some chars
    It is possible that Newtonsoft.Json doesn't parse the json properly because of those chars
    Omid Nasri
    @omidnasri
    wait until test this
    Jasmin Savard
    @Skrypt
    ‌‌ok I see the issue
    The Content json object is double encoded