0 Replies Latest reply on Oct 16, 2017 3:14 AM by 真森本 RSS
    真森本 Newbie

    Not modify permission for AddRunTimePermission

    I try to modify runtime permission of service.

    I attempted to change using AddRunTimePermission, but it was not possible to execute with the pattern of Ⅱ.

     

    I.

    var params = {

    principal: "morimoto" /* STRING */,

    allow: true /* BOOLEAN */,

    resource: "service1" /* STRING */,

    type: "ServiceInvoke" /* STRING */,

    principalType: "User" /* STRING */

    };

    Things["WorkThing"].AddRunTimePermission(params);

    var result = Things["WorkThing"].GetRunTimePermissions();

     

    Ⅱ.

    var params = {

    principal: "morimoto" /* STRING */,

    allow: true /* BOOLEAN */,

    resource: "service1" /* STRING */,

    type: "ServiceInvoke" /* STRING */,

    principalType: "User" /* STRING */

    };

    me.AddRunTimePermission(params);

    var result = me.GetRunTimePermissions();

     

    For confirmation, I executed the following service.

     

    var params = {

    principal: "morimoto" /* STRING */,

    allow: true /* BOOLEAN */,

    resource: "service1" /* STRING */,

    type: "ServiceInvoke" /* STRING */,

    principalType: "User" /* STRING */

    };

    me.AddRunTimePermission(params);

    //result: INFOTABLE dataShape: "Permissions"

    var result = me.GetRunTimePermissions();

     

    result is

     

    Although it seems to be able to run without problems...

    Running GetRunTimePermissions did not yield results.

     

     

    If there are people who have experienced the same event or who knows how to solve it, I will be waiting for comments.