JiscMail Logo
Email discussion lists for the UK Education and Research communities

Help for PERMIS-USERS Archives


PERMIS-USERS Archives

PERMIS-USERS Archives


PERMIS-USERS@JISCMAIL.AC.UK


View:

Message:

[

First

|

Previous

|

Next

|

Last

]

By Topic:

[

First

|

Previous

|

Next

|

Last

]

By Author:

[

First

|

Previous

|

Next

|

Last

]

Font:

Proportional Font

LISTSERV Archives

LISTSERV Archives

PERMIS-USERS Home

PERMIS-USERS Home

PERMIS-USERS  November 2006

PERMIS-USERS November 2006

Options

Subscribe or Unsubscribe

Subscribe or Unsubscribe

Log In

Log In

Get Password

Get Password

Subject:

Error in Python Permis API

From:

Meitham Jamaa <[log in to unmask]>

Reply-To:

For users/administrators of the PERMIS authorisation software <[log in to unmask]>

Date:

Thu, 2 Nov 2006 13:03:24 +0000

Content-Type:

text/plain

Parts/Attachments:

Parts/Attachments

text/plain (42 lines)

Hi Gansen,

Thank you for your help, the documentation helped me so much. I want to
highlight an error in the code of Python Permis integration on Permis
website. The error is in the handling the return value of the decision
method. according to the documentation this method will return a boolean
value of true for permit and false for deny depending on the policy. and
Python handles boolean variables the same way C does (0 is false and 1
is true). The output of this method should be replaced from
------------------------------------------------------------------------------------
    result = adf.decision(subject,permisAction,permisTarget,None)
    if result > 0:
        print "1: the action is not allowed"
    else:
        print "0: action succeeded"
------------------------------------------------------------------------------------
TO
------------------------------------------------------------------------------------
    result = adf.decision(subject,permisAction,permisTarget,None)
    if result == 0:
        print "0: the action is not allowed"
    else:
        print "1: action succeeded"
------------------------------------------------------------------------------------
by replacing the positions of zero and one.

kindest regards
Meitham

Gansen Zhao wrote:
> Hi Meitham
>
> I think you shall look at 
>
> http://sec.cs.kent.ac.uk/permis/downloads/Level2/SimplePermis.shtml
>
> When you could download the docs of simple permis.
>
> Cheers
>
> Gansen 
>   

Top of Message | Previous Page | Permalink

JiscMail Tools


RSS Feeds and Sharing


Advanced Options


Archives

September 2017
May 2014
June 2013
April 2013
November 2012
September 2012
July 2012
February 2012
November 2011
October 2011
September 2011
June 2011
May 2011
April 2011
March 2011
February 2011
November 2010
October 2010
August 2010
July 2010
April 2010
March 2010
February 2010
January 2010
December 2009
October 2009
August 2009
June 2009
March 2009
February 2009
January 2009
November 2008
October 2008
May 2008
April 2008
February 2008
January 2008
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
May 2007
March 2007
February 2007
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006


JiscMail is a Jisc service.

View our service policies at https://www.jiscmail.ac.uk/policyandsecurity/ and Jisc's privacy policy at https://www.jisc.ac.uk/website/privacy-notice

Secured by F-Secure Anti-Virus CataList Email List Search Powered by the LISTSERV Email List Manager