-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbase_content_type.sol
43 lines (34 loc) · 1.6 KB
/
base_content_type.sol
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
pragma solidity 0.5.4;
import {Editable} from "./editable.sol";
import "./accessible.sol";
//import "./access_indexor.sol";
import "./user_space.sol";
import "./node_space.sol";
/* -- Revision history --
BaseContentType20190222145700ML: First versioned released
BaseContentType20190318101200ML: Migrated to 0.4.24
BaseContentType20190506153900ML: Adds access indexing
BaseContentType20190515104000ML: Overloads canPublish to take into account EDIT privilege granted for update request and commit
BaseContentType20190528194000ML: Removes contentSpace is field as it is now inherited from Ownable
BaseContentType20190604112500ML: Fixes setGroupRights to use the right index.
BaseContentType20190605150100ML: Splits out canConfirm from canPublish
BaseContentType20190813105000ML: Modifies canCommit to ensure it is a view
BaseContentType20200109163600ML: Supports visibility default filter
BaseContentType20200210110700ML: Supports authv3 API
BaseContentType20200316135100ML: Leverages inherited hasAccess
*/
contract BaseContentType is Editable {
bytes32 public version ="BaseContentType20200316135100ML"; //class name (max 16), date YYYYMMDD, time HHMMSS and Developer initials XX
constructor(address payable content_space) public payable {
contentSpace = content_space;
visibility = 0;
indexCategory = 4; // AccessIndexor CATEGORY_CONTENT_TYPE
}
function canCommit() public view returns (bool) {
return canEdit();
}
function canConfirm() public view returns (bool) {
INodeSpace spc = INodeSpace(contentSpace);
return spc.canNodePublish(msg.sender);
}
}