setAccess            package:RGoogleDocs            R Documentation

_Q_u_e_r_y _a_n_d _m_o_d_i_f_y _t_h_e _A_c_c_e_s_s _C_o_n_t_r_o_l _L_i_s_t

_D_e_s_c_r_i_p_t_i_o_n:

     These functions allow one to programmatically  query and modify
     the access control list for a a Google document. These allows us
     to find out or specify who owns, can write, or read the document.
     We can also revoke permission.

_U_s_a_g_e:

     setAccess(doc, ..., .perms = list(...), con = doc@connection)
     getAccess(doc, con = doc@connection)
     removeAccess(doc, who, con = doc@connection)

_A_r_g_u_m_e_n_t_s:

     doc: the GoogleDocumentDescription object or the name of a
          document. If this is just the name, 'con' must be specified.

     ...: name = value pairs where name gives the type of access being 
          granted and value is the identity of the person to whom it is
          being granted. value is typically an email address or
          ''everyone''.

  .perms: this provides an alternative way to specify the type-who
          pairs rather than ... whch is more convenient for calling
          this function programmatically rather than interactively.

     con: the authenticated Google connection. See
          'getGoogleDocsConnection'.

     who: the identity of the user for who the permission is to be
          removed. This is an email address or ''everyone''.

_V_a_l_u_e:

     'getAccess' returns a character vector giving the type-who pairs.

     'setAccess' returns the updated access list.

     'removeAccess' returns the result of the HTTP request to remove
     the permissions. See 'parseHTTPHeader'.

_N_o_t_e:

     For reasons I haven't got to the bottom of yet,  setAccess() can
     return a value that is different from a subsequent call to
     getAccess(),  yet that is precisely the call at the end of
     setAccess() with  the same connection object! ' con =
     getGoogleDocsConnection() docs = getDocs(con) setAccess(docs$foo,
     writer = 'duncan@wald.ucdavis.edu', reader = 'everyone') owner    
                    writer                    reader 
     "dtemplelang@gmail.com" "duncan@wald.ucdavis.edu"               
     "everyone"  getAccess(docs$TwoSheets, getGoogleDocsConnection())
     owner                  reader  "dtemplelang@gmail.com"            
      "everyone"  '

_A_u_t_h_o_r(_s):

     Duncan Temple Lang

_R_e_f_e_r_e_n_c_e_s:

     <URL:
     http://code.google.com/apis/documents/docs/2.0/developers_guide_protocol.html#AccessControlLists>

_S_e_e _A_l_s_o:

     'getDocs' 'getGoogleDocsConnection'

